User Guide

172 128-Bit Media and Scientific Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
CMPPD—Compare Packed Double-Precision Floating-Point
CMPSS—Compare Scalar Single-Precision Floating-Point
CMPSD—Compare Scalar Double-Precision Floating-Point
The CMPPS instruction compares each of four single-precision floating-point values in the first
operand with the corresponding single-precision floating-point value in the second operand and writes
the result in the corresponding 32 bits of the destination. The type of comparison is specified by the
three low-order bits of the immediate-byte operand. The result of each compare is a 32-bit value of all
1s (TRUE) or all 0s (FALSE). Some compare operations that are not directly supported by the
immediate-byte encodings can be implemented by swapping the contents of the source and destination
operands before executing the compare.
The CMPPD instruction performs an analogous operation for two double-precision floating-point
values. The CMPSS instruction performs an analogous operation for the single-precision floating-
point values in the low-order 32 bits of the source operands. The three high-order doublewords of the
destination are not modified. The CMPSD instruction performs an analogous operation for the double-
precision floating-point values in the low-order 64 bits of the source operands. The high-order 64 bits
of the destination XMM register are not modified.
Figure 4-36 shows a CMPPD compare operation.
Figure 4-36. CMPPD Compare Operation
Compare and Write Minimum or Maximum
MAXPS—Maximum Packed Single-Precision Floating-Point
MAXPD—Maximum Packed Double-Precision Floating-Point
MAXSS—Maximum Scalar Single-Precision Floating-Point
513-162.eps
result
operand 1
127 0
127 0
operand 2
127 0
imm8
compare
all 1s or 0s all 1s or 0s
compare