Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1414

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

FCOM/FCOMP/FCOMPP—Compare Real
Opcode
D8 /2
DC /2
D8 D0+i
D8 D1
D8 /3
DC /3
D8 D8+i
D8 D9
DE D9
Description
Compares the contents of register ST(0) and source value and sets condition code flags
C0, C2, and C3 in the FPU status word according to the results (see the table below).
The source operand can be a data register or a memory location. If no source operand
is given, the value in ST(0) is compared with the value in ST(1). The sign of zero is
ignored, so that -0.0 = +0.0.
Condition
ST(0) > SRC
ST(0) < SRC
ST(0) = SRC
Unordered
a. Flags not set if unmasked invalid-arithmetic-operand (#IA) exception is
generated.
This instruction checks the class of the numbers being compared. If either operand is a
NaN or is in an unsupported format, an invalid-arithmetic-operand exception (#IA) is
raised and, if the exception is masked, the condition flags are set to "unordered." If the
invalid-arithmetic-operand exception is unmasked, the condition code flags are not set.
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.
4:112
Instruction
FCOM m32real
FCOM m64real
FCOM ST(i)
FCOM
FCOMP m32real
FCOMP m64real
FCOMP ST(i)
FCOMP
FCOMPP
C3
0
0
1
a
1
Description
Compare ST(0) with m32real .
Compare ST(0) with m64real .
Compare ST(0) with ST(i).
Compare ST(0) with ST(1).
Compare ST(0) with m32real and pop register stack.
Compare ST(0) with m64real and pop register stack.
Compare ST(0) with ST(i) and pop register stack.
Compare ST(0) with ST(1) and pop register stack.
Compare ST(0) with ST(1) and pop register stack twice.
C2
C0
0
0
0
1
0
0
1
1
Volume 4: Base IA-32 Instruction Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents