Home

FDiv

FDIV is an instruction in the x87 floating-point unit (FPU) used to perform floating-point division. It operates on the FPU’s register stack, where computations are carried out using ST(0) as the primary accumulator and another source operand either from another stack register (ST(i)) or from a memory operand. The result of the division is stored back into ST(0).

There are two main forms of the operation. The standard form, FDIV ST(i), computes ST(0) = ST(0) /

FDIV is part of the broader x87 instruction set introduced with the 8087 coprocessor and carried through

In modern software, FDIV and related x87 instructions have been superseded for many tasks by vectorized and

ST(i).
The
reciprocal
form,
FDIVR
ST(i),
computes
ST(0)
=
ST(i)
/
ST(0).
In
addition,
FDIV
can
take
a
memory
operand,
such
as
FDIV
m32fp
or
FDIV
m64fp,
which
divides
ST(0)
by
the
floating-point
value
located
in
memory,
with
the
result
stored
in
ST(0).
The
destination
of
the
operation
is
always
ST(0);
other
stack
registers
remain
unchanged.
later
x86
processors.
Its
behavior,
including
exception
handling
for
conditions
like
division
by
zero,
overflow,
underflow,
invalid
operation,
and
inexact
results,
depends
on
the
current
floating-point
control
word
and
status
word
settings.
scalar
floating-point
instructions
in
SSE
and
AVX,
but
they
remain
available
for
compatibility
with
legacy
code
and
certain
low-level
numerical
routines
that
rely
on
the
x87
stack
architecture.