A.5.73 FCOM, FCOMP, FCOMPP, FCOMI, FCOMIP: Floating-Point Compare
FCOM mem32 ; D8 /2 [8086,FPU]
FCOM mem64 ; DC /2 [8086,FPU]
FCOM fpureg ; D8 D0+r [8086,FPU]
FCOM ST0,fpureg ; D8 D0+r [8086,FPU]
FCOMP mem32 ; D8 /3 [8086,FPU]
FCOMP mem64 ; DC /3 [8086,FPU]
FCOMP fpureg ; D8 D8+r [8086,FPU]
FCOMP ST0,fpureg ; D8 D8+r [8086,FPU]
FCOMPP ; DE D9 [8086,FPU]
FCOMI fpureg ; DB F0+r [P6,FPU]
FCOMI ST0,fpureg ; DB F0+r [P6,FPU]
FCOMIP fpureg ; DF F0+r [P6,FPU]
FCOMIP ST0,fpureg ; DF F0+r [P6,FPU]
FCOM compares ST0 with the given operand, and sets the FPU flags
accordingly. ST0 is treated as the left-hand side of the comparison, so
that the carry flag is set (for a "less-than" result) if ST0 is less
than the given operand.
FCOMP does the same as FCOM, but pops the register stack afterwards.
FCOMPP compares ST0 with ST1 and then pops the register stack twice.
FCOMI and FCOMIP work like the corresponding forms of FCOM and FCOMP,
but write their results directly to the CPU flags register rather than
the FPU status word, so they can be immediately followed by conditional
jump or conditional move instructions.
The FCOM instructions differ from the FUCOM instructions (section
A.5.108) only in the way they handle quiet NaNs: FUCOM will handle them
silently and set the condition code flags to an "unordered" result,
whereas FCOM will generate an exception.