3-78
INSTRUCTION SET REFERENCE
CMPPS—Packed Single-FP Compare
Description
For each individual pair of SP FP numbers, the CMPPS instruction returns an all "1" 32-bit mask
or an all "0" 32-bit mask, using the comparison predicate specified by imm8.
Figure 3-8. Operation of the CMPPS (Imm8=1) Instruction
OpcodeInstruction
Description
0F,C2,/r,ibCMPPS xmm1,
xmm2/m128, imm8
Compare packed SP FP numbers from XMM2/Mem to packed SP
FP numbers in XMM1 register using imm8 as predicate.
Figure 3-7. Operation of the CMPPS (Imm8=0) Instruction
True
False
False
True
==
==
==
Xmm1
Xmm2/
m128
Xmm1
10.0
00000000
11111111
00000000
11111111
9.0
CMPPS xmm1, xmm2/m128, imm8 (imm8=0)
10.0
2.0
Xmm1
Xmm2/
m128
CMPPS xmm1, xmm2/m128,imm8 (Imm8=1)
3.0
10.0
True
True
False
False
11.0
9.0
4.0
2.0
9.0
1.0
<
<
<
<
00000000
00000000
11111111
11111111
Xmm1