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

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

Advertisement

FCOMI/FCOMIP/ FUCOMI/FUCOMIP—Compare Real and Set EFLAGS
Opcode
DB F0+i
DF F0+i
DB E8+i
DF E8+i
Description
Compares the contents of register ST(0) and ST(i) and sets the status flags ZF, PF, and
CF in the EFLAGS register according to the results (see the table below). The sign of
zero is ignored for comparisons, 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.
The FCOMI/FCOMIP instructions perform the same operation as the FUCOMI/FUCOMIP
instructions. The only difference is how they handle QNaN operands. The
FCOMI/FCOMIP instructions set the status flags to "unordered" and generate an
invalid-arithmetic-operand exception (#IA) when either or both of the operands is a
NaN value (SNaN or QNaN) or is in an unsupported format.
The FUCOMI/FUCOMIP instructions perform the same operation as the FCOMI/FCOMIP
instructions, except that they do not generate an invalid-arithmetic-operand exception
for QNaNs.
If invalid-operation exception is unmasked, the status flags are not set if the
invalid-arithmetic-operand exception is generated.
The FCOMIP and FUCOMIP instructions also pop the register stack 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.
Volume 4: Base IA-32 Instruction Reference
Instruction
FCOMI ST, ST( i )
FCOMIP ST, ST( i )
FUCOMI ST, ST( i )
FUCOMIP ST, ST( i )
ZF
0
0
1
a
1
Description
Compare ST(0) with ST( i ) and set status flags accordingly
Compare ST(0) with ST( i ), set status flags accordingly, and pop
register stack
Compare ST(0) with ST( i ), check for ordered values, and set
status flags accordingly
Compare ST(0) with ST( i ), check for ordered values, set status
flags accordingly, and pop register stack
PF
CF
0
0
0
1
0
0
1
1
4:115

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents