FCOMI           Compare real and set EFLAGS          Exceptions: I D
FCOMIP Compare real, set EFLAGS, and pop C3 C2 C1 C0: - - * -
FPU: PPro+
FCOMI destination, source
FCOMIP destination, source

Logic ; FCOMI dest, src ; FCOMIP dest, src
CMP ST, ST(src) CMP ST, ST(src)
determine ZF,PF,CF determine ZF,PF,CF
POP ST

Compares the contents of register ST(0) and ST(i) and sets the
status flags ZF, PF, and CF in the EFLAGS register according to the
results.
The sign of zero is ignored for comparisons, so that -0.0 = +0.0.

ZF PF CF
0 0 0 ST > ST(i)
0 0 1 ST < ST(i)
1 0 0 ST = ST(i)
1 1 1 Unordered

The FCOMI/FCOMIP instructions perform the same operation as the
FUCOMI/FUCOMIP instructions. The only difference is how they handle
QNaN operands. The FCOMI/FCOMIP instructions set the status flags to
unordered and generate an invalid-arithmetic-operand exception (#IA)
when either or both of the operands is a NaN value (SNaN or QNaN) or
is in an unsupported format.

The FUCOMI/FUCOMIP instructions perform the same operation as the
FCOMI/FCOMIP instructions, except that they do not generate an
invalid-arithmetic-operand exception for QNaNs.


If invalid-operation exception is unmasked, the flags are not set if
the invalid-arithmetic-operand exception is generated.


Opcode Format
DB F0 + i FCOMI ST, ST(i)
DF F0 + i FCOMIP ST, ST(i)
DB E8 + i FUCOMI ST, ST(i)
DF E8 + i FUCOMIP ST, ST(i)


Timing
??