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.

<strong>AMD</strong> <strong>64</strong>-<strong>Bit</strong> <strong>Technology</strong> 26568—Rev. 3.02—August 2002<br />

COMISD<br />

Compare Ordered Scalar Double-Precision<br />

Floating-Point<br />

Compares the double-precision floating-point value in the low-order <strong>64</strong> bits of an<br />

XMM register with the double-precision floating-point value in the low-order <strong>64</strong> bits of<br />

another XMM register or a <strong>64</strong>-bit memory location and sets the ZF, PF, and CF bits in<br />

the rFLAGS register to reflect the result of the comparison. The result is unordered if<br />

one or both of the operand values is a NaN. The OF, AF, and SF bits in rFLAGS are set<br />

to zero.<br />

If the instruction causes an unmasked SIMD floating-point exception (#XF), the<br />

rFLAGS bits are not updated.<br />

Mnemonic Opcode Description<br />

COMISD xmm1, xmm2/mem<strong>64</strong> 66 0F 2F /r Compares double-precision floating-point values in an XMM<br />

register and an XMM register or <strong>64</strong>-bit memory location and sets<br />

rFLAGS.<br />

xmm1<br />

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

xmm2/mem<strong>64</strong><br />

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

compare<br />

63<br />

0<br />

31<br />

rFLAGS<br />

0<br />

comisd.eps<br />

Result of Compare ZF PF CF<br />

Unordered 1 1 1<br />

Greater Than 0 0 0<br />

Less Than 0 0 1<br />

Equal 1 0 0<br />

36 COMISD

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

Saved successfully!

Ooh no, something went wrong!