Home

x87

The x87 is the floating-point unit (FPU) and instruction set used in Intel's x86 architecture. It originated with the 8087 coprocessor, released in 1987 to provide hardware support for floating-point calculations alongside the 8086/8088. In later generations, the FPU was integrated onto the same die as the processor (starting with the 80486 family), and the x87 instructions remained the primary means of performing floating-point operations in many software systems for years.

The x87 FPU uses a stack-based register model with eight 80-bit registers, designated ST0 through ST7. Operations

With the rise of SIMD floating-point extensions in the late 1990s, Intel introduced SSE and later SSE2,

Today, x87 remains backward compatible on modern CPUs, but it is largely superseded for new code by

typically
operate
on
the
top
of
the
stack,
and
instructions
may
push,
pop,
or
exchange
stack
elements.
By
default,
the
FPU
uses
80-bit
extended
precision,
with
options
to
convert
to
32-bit
single
or
64-bit
double
precision.
The
instruction
set
includes
arithmetic
operations
(FADD,
FSUB,
FMUL,
FDIV),
comparisons
(FCOM,
FCOMI),
data
transfers,
and
transcendental
functions,
as
well
as
control
flow
and
data
conversion
instructions.
The
FPU
maintains
a
control
word,
status
word,
and
tag
word
that
govern
precision,
rounding,
exception
masks,
and
stack
state.
which
provide
separate
128-bit
XMM
registers
for
vector
operations.
These
technologies
offered
higher
throughput
for
most
workloads,
and
compilers
and
libraries
gradually
shifted
toward
SSE-based
code,
though
the
x87
unit
remained
present
for
backward
compatibility
and
certain
extended-precision
or
complex-number
routines.
SSE
and
related
technologies.
Context
switching
and
operating-system
saving
of
the
FPU
state
continue
to
be
important
considerations
in
multitasking
environments.