09.01.2013 Views

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

AMD x86-64 Architecture Programmer's Manual, Volume 4, 128-Bit ...

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.05—September 2003 <strong>AMD</strong><strong>64</strong> Technology<br />

CMPPD Compare Packed Double-Precision<br />

Floating-Point<br />

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

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

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

corresponding <strong>64</strong> 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. The result of each compare is a <strong>64</strong>-bit value of all 1s (TRUE) or all 0s<br />

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

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

Mnemonic Opcode Description<br />

CMPPD xmm1, xmm2/mem<strong>128</strong>, imm8 66 0F C2 /r ib Compares two pairs of packed double-precision<br />

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

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

xmm1 xmm2/mem<strong>128</strong><br />

127 <strong>64</strong> 63 0 127 <strong>64</strong> 63 0<br />

compare<br />

imm8<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, together with<br />

7 0<br />

compare<br />

all 1s or 0s all 1s or 0s<br />

cmppd.eps<br />

CMPPD 23

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

Saved successfully!

Ooh no, something went wrong!