3-181
INSTRUCTION SET REFERENCE
FCOM/FCOMP/FCOMPPCompare Real (Continued)
The FCOM instructions perform the same operation as the FUCOM instructions. The only
difference is how they handle qNaN operands. The FCOM instructions raise an invalid-arith-
metic-operand exception (#IA) when either or both of the operands is a NaN value or is in an
unsupported format. The FUCOM instructions perform the same operation as the FCOM
instructions, except that they do not generate an invalid-arithmetic-operand exception for
qNaNs.
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 = NaN or unsupported format
THEN
#IA
IF FPUControlWord.IM = 1
THEN
C3, C2, C0
<
111;
FI;
FI;
IF instruction = FCOMP
THEN
PopRegisterStack;
FI;
IF instruction = FCOMPP
THEN
PopRegisterStack;
PopRegisterStack;
FI;
FPU Flags Affected
C1
Set to 0 if stack underflow occurred; otherwise, cleared to 0.
C0, C2, C3
Refer to table on previous page.
Floating-Point Exceptions
#IS
Stack underflow occurred.
#IA
One or both operands are NaN values or have unsupported formats.
Register is marked empty.
#D
One or both operands are denormal values.