User Guide
272 x87 Floating-Point Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
• FUCOMIP—Floating-Point Unordered Compare and Set Flags and Pop
The FUCOMx instructions perform the same operations as the FCOMx instructions, except that the
FUCOMx instructions generate an invalid-operation exception (IE) only if any operand is an
unsupported data type or a signaling NaN (SNaN), whereas the ordered-compare FCOMx instructions
generate an invalid-operation exception if any operand is an unsupported data type or any type of NaN.
For a description of NaNs, see “Number Representation” on page 253.
Integer Compare
• FICOM—Floating-Point Integer Compare
• FICOMP—Floating-Point Integer Compare and Pop
The FICOM instruction reads a 16-bit or 32-bit integer value from memory, compares it with ST(0),
and writes the condition codes in the same way as the FCOM instruction.
The FICOMP instruction performs the same operations as FICOM but also pops ST(0).
Test
• FTST—Floating-Point Test with Zero
The FTST instruction compares ST(0) with zero and writes the condition codes in the same way as the
FCOM instruction.
Classify
• FXAM—Floating-Point Examine
The FXAM instruction determines the type of value in ST(0) and sets the condition codes accordingly,
as shown in Table 6-15.
Table 6-15. Condition-Code Settings for FXAM
C3 C2 C0
C1
1
Meaning
0000+unsupported
0001-unsupported
0010 +NAN
0011 -NAN
0100 +normal
0101 -normal
0110 +infinity
0111 -infinity
1000 +0
1001 -0
Note:
1. C1 is the sign of ST(0).