7-33
FLOATING-POINT UNIT
Operands are normally stored in the FPU data registers in extended-real format (refer to Section
7.3.4.2., Precision Control Field). The FLD (load real) instruction pushes a real operand from
memory onto the top of the FPU data-register stack. If the operand is in single- or double-real
format, it is automatically converted to extended-real format. This instruction can also be used
to push the value in a selected FPU data register onto the top of the register stack.
The FILD (load integer) instruction converts an integer operand in memory into extended-real
format and pushes the value onto the top of the register stack. The FBLD (load packed decimal)
instruction performs the same load operation for a packed BCD operand in memory.
The FST (store real) and FIST (store integer) instructions store the value in register ST(0) in
memory in the destination format (real or integer, respectively). Again, the format conversion is
carried out automatically.
The FSTP (store real and pop), FISTP (store integer and pop), and FBSTP (store packed decimal
and pop) instructions store the value in the ST(0) registers into memory in the destination format
(real, integer, or packed BCD), then performs a pop operation on the register stack. A pop oper-
ation causes the ST(0) register to be marked empty and the stack pointer (TOP) in the FPU
control work to be incremented by 1. The FSTP instruction can also be used to copy the value
in the ST(0) register to another FPU register [ST(i)].
The FXCH (exchange register contents) instruction exchanges the value in a selected register in
the stack [ST(i)] with the value in ST(0).
The FCMOVcc (conditional move) instructions move the value in a selected register in the stack
[ST(i)] to register ST(0). These instructions move the value only if the conditions specified with
a condition code (cc) are satisfied (refer to Table 7-14). The conditions being tested with the
FCMOVcc instructions are represented by the status flags in the EFLAGS register. The condi-
tion code mnemonics are appended to the letters FCMOV to form the mnemonic for a
FCMOVcc instruction.
Table 7-14. Floating-Point Conditional Move Instructions
Instruction Mnemonic
Status Flag States
Condition Description
FCMOVB
CF=1
Below
FCMOVNB
CF=0
Not below
FCMOVE
ZF=1
Equal
FCMOVNE
ZF=0
Not equal
FCMOVBE
(CF or ZF)=1
Below or equal
FCMOVNBE
(CF or ZF)=0
Not below nor equal
FCMOVU
PF=1
Unordered
FCMOVNU
PF=0
Not unordered