3-82
INSTRUCTION SET REFERENCE
CMPPSPacked Single-FP Compare (Continued)
Note that a subsequent computational instruction which uses this mask as an input operand will
not generate a fault, since a mask of all "0s" corresponds to an FP value of +0.0 and a mask of
all "1s" corresponds to an FP value of -qNaN. Some of the comparisons can be achieved only
through software emulation. For these comparisons the programmer must swap the operands,
copying registers when necessary to protect the data that will now be in the destination, and then
perform the compare using a different predicate. The predicate to be used for these emulations
is listed in the table under the heading "Emulation". The following table shows the different
comparison types:
:
NOTE:
The greater-than, greater-than-or-equal, not-greater-than, and not-greater-than-or-equal relations are not
directly implemented in hardware.
PredicateDescriptionRelationEmulationimm8
Encoding
Result if
NaN
Operand
Q/SNaN
Operand
Signals
Invalid
eq
equal
xmm1 ==
xmm2
000BFalseNo
lt
less-than
xmm1 <
xmm2
001BFalseYes
le
less-than-or-equalxmm1 <=
xmm2
010BFalseYes
greater than
xmm1 >
xmm2
swap,
protect, lt
FalseYes
greater-than-or-
equal
xmm1 >=
xmm2
swap
protect, le
FalseYes
unordunordered
xmm1 ?
xmm2
011BTrueNo
neq
not-equal
!(xmm1 ==
xmm2)
100BTrueNo
nlt
not-less-than
!(xmm1 <
xmm2)
101BTrueYes
nle
not-less-than-or-
equal
!(xmm1 <=
xmm2)
110BTrueYes
not-greater-than!(xmm1 >
xmm2)
swap,
protect, nlt
TrueYes
not-greater-than-or-
equal
!(xmm1 >=
xmm2)
swap,
protect, nle
TrueYes
ord
ordered
!(xmm1 ?
xmm2)
111BFalseNo