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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

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

CMPPS<br />

Compare Packed Single-Precision<br />

Floating-Point<br />

Compares each of the four packed single-precision floating-point values in the first<br />

source operand with the corresponding packed single-precision floating-point value in<br />

the second source operand and writes the result of each comparison in the<br />

corresponding 32 bits of the destination (first source). The type of comparison is<br />

specified by the three low-order bits of the immediate-byte operand, as shown in<br />

Table 1-1 on page 24. The result of each compare is a 32-bit value of all 1s (TRUE) or<br />

all 0s (FALSE). The first source/destination operand is an XMM register. The second<br />

source operand is another XMM register or 128-bit memory location.<br />

Mnemonic Opcode Description<br />

CMPPS xmm1, xmm2/mem128, imm8 0F C2 /r ib Compares four pairs of packed single-precision<br />

floating-point values in an XMM register and an XMM<br />

register or <strong>64</strong>-bit memory location.<br />

.<br />

xmm1<br />

127 96 95 <strong>64</strong> 63 32 31<br />

0<br />

.<br />

xmm2/mem128<br />

127 96 95 <strong>64</strong> 63 32 31<br />

0<br />

.<br />

.<br />

imm8<br />

7 0<br />

.<br />

.<br />

compare<br />

compare<br />

all 1s or 0s<br />

all 1s or 0s<br />

cmpps.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 />

CMPPS 27

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

Saved successfully!

Ooh no, something went wrong!