Vol. 2A 3-409
INSTRUCTION SET REFERENCE, A-M
FUCOM/FUCOMP/FUCOMPP—Unordered Compare Floating Point Values
The FUCOMP instruction pops the register stack following the comparison operation
and the FUCOMPP instruction pops the register stack twice following the comparison
operation. To pop the register stack, the processor marks the ST(0) register as
empty and increments the stack pointer (TOP) by 1.
This instruction’s operation is the same in non-64-bit modes and 64-bit mode.
Operation
CASE (relation of operands) OF
ST > SRC: C3, C2, C0 ← 000;
ST < SRC: C3, C2, C0 ← 001;
ST
= SRC: C3, C2, C0 ← 100;
ESAC;
IF ST(0) or SRC = QNaN, but not SNaN or unsupported format
THEN
C3, C2, C0 ← 111;
ELSE (* ST(0) or SRC is SNaN or unsupported format *)
#IA;
IF FPUControlWord.IM
= 1
THEN
C3, C2, C0 ← 111;
FI;
FI;
IF Instruction
= FUCOMP
THEN
PopRegisterStack;
FI;
IF Instruction
= FUCOMPP
THEN
PopRegisterStack;
FI;
FPU Flags Affected
C1 Set to 0 if stack underflow occurred.
C0, C2, C3 See Table 3-46.
Floating-Point Exceptions
#IS Stack underflow occurred.