25.02.2015 Views

AMD 64-Bit Technology - ECE User Home Pages

AMD 64-Bit Technology - ECE User Home Pages

AMD 64-Bit Technology - ECE User Home Pages

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

26568—Rev. 3.02—August 2002<br />

<strong>AMD</strong> <strong>64</strong>-<strong>Bit</strong> <strong>Technology</strong><br />

CMPSS<br />

Compare Scalar Single-Precision<br />

Floating-Point<br />

Compares the single-precision floating-point value in the low-order 32 bits of the first<br />

source operand with the single-precision floating-point value in the low-order 32 bits<br />

of the second source operand and writes the result in the low-order 32 bits of the<br />

destination (first source). The type of comparison is specified by the three low-order<br />

bits of the immediate-byte operand, as shown in Table 1-1 on page 24. The result of the<br />

compare is a 32-bit value of all 1s (TRUE) or all 0s (FALSE). The first<br />

source/destination operand is an XMM register. The second source operand is another<br />

XMM register or 32-bit memory location. The three high-order doublewords of the<br />

destination XMM register are not modified.<br />

Mnemonic Opcode Description<br />

CMPSS xmm1, xmm2/mem32, imm8 F3 0F C2 /r ib Compares single-precision floating-point values in an<br />

XMM register and an XMM register or 32-bit memory<br />

location.<br />

xmm1<br />

xmm2/mem32<br />

127 32 31 0 127 32 31 0<br />

imm8<br />

7 0<br />

compare<br />

cmpss.eps<br />

Some compare operations that are not directly supported by the immediate-byte<br />

encodings can be implemented by swapping the contents of the source and<br />

destination operands and then executing the appropriate compare instruction using<br />

the swapped values. These additional compare operations are shown in Table 1-1 on<br />

page 24. When swapping operands, the first source XMM register is overwritten by the<br />

result.<br />

CMPSS 33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!