Intel 253666-024US Computer Hardware User Manual


 
3-306 Vol. 2A FCMOVcc—Floating-Point Conditional Move
INSTRUCTION SET REFERENCE, A-M
The FCOMP instruction pops the register stack following the comparison operation
and the FCOMPP 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.
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-arithmetic-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.
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
= 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, set to 0.
C0, C2, C3 See table on previous page.