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

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

Advertisement

FUCOM/FUCOMP/FUCOMPP—Unordered Compare Real
Opcode
DD E0+i
DD E1
DD E8+i
DD E9
DA E9
Description
Performs an unordered comparison of the contents of register ST(0) and ST(i) and sets
condition code flags C0, C2, and C3 in the FPU status word according to the results (see
the table below). If no operand is specified, the contents of registers ST(0) and ST(1)
are compared. The sign of zero is ignored, so that -0.0 = +0.0.
Comparison Results
ST0 > ST(i)
ST0 < ST(i)
ST0 = ST(i)
Unordered
a. Flags not set if unmasked invalid-arithmetic- operand
(#IA) exception is generated.
An unordered comparison checks the class of the numbers being compared (see
"FXAM—Examine" on page
operation as the FCOM instructions. The only difference is that the FUCOM instruction
raises the invalid-arithmetic-operand exception (#IA) only when either or both
operands is an SNaN or is in an unsupported format; QNaNs cause the condition code
flags to be set to unordered, but do not cause an exception to be generated. The FCOM
instruction raises an invalid-operation exception when either or both of the operands is
a NaN value of any kind or is in an unsupported format.
As with the FCOM instructions, if the operation results in an invalid-arithmetic-operand
exception being raised, the condition code flags are set only if the exception is masked.
The FUCOMP instructions pop the register stack following the comparison operation and
the FUCOMPP instructions 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.
Operation
CASE (relation of operands) OF
ST > SRC:
ST < SRC:
ST = SRC:
ESAC;
IF ST(0) or SRC = QNaN, but not SNaN or unsupported format
4:190
Instruction
FUCOM ST(i)
FUCOM
FUCOMP ST(i)
FUCOMP
FUCOMPP
C3
0
0
1
a
1
4:193). The FUCOM instructions perform the same
C3, C2, C0  000;
C3, C2, C0  001;
C3, C2, C0  100;
Description
Compare ST(0) with ST(i)
Compare ST(0) with ST(1)
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