3-90
INSTRUCTION SET REFERENCE
CMPSSScalar Single-FP Compare
Description
For the lowest pair of SP FP numbers, the CMPSS instruction returns an all "1" 32-bit mask or
an all "0" 32-bit mask, using the comparison predicate specified by imm8. The values for the
upper three pairs of SP FP numbers are not compared. Note that a subsequent computational
instruction, which uses this mask as an input operand, will not generate a fault, since a mask of
all "0"s corresponds to an FP value of +0.0, and a mask of all "1s" corresponds to an FP value
of -qNaN. Some comparisons can be achieved only through software emulation. For those
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 under the heading
"Emulation."
Opcode
Instruction
Description
F3,0F,C2,/r,ibCMPSS xmm1,
xmm2/m32, imm8
Compare lowest SP FP number from XMM2/Mem to lowest
SP FP number in XMM1 register using imm8 as predicate.