وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

PCMPxxx

PCMPxxx

Usage:  PCMPxxx   dest,src                         Modifies flags: None

Performs an SIMD compare for equality of the packed bytes, words, or doublewords in the 'dest' operand and the 'src' operand. If a pair of data elements is equal, the corresponding data element in the 'dest' operand is set to all 1s; otherwise, it is set to all 0s.

Compare Packed Integers.

PCMPEQB / PCMPEQW / PCMPEQD / PCMPGTB/PCMPGTW/PCMPGTD


PCMPEQB mm1,mm2/m64           ; 0F 74 /r              [PENT,MMX]

PCMPEQW mm1,mm2/m64           ; 0F 75 /r              [PENT,MMX]

PCMPEQD mm1,mm2/m64           ; 0F 76 /r              [PENT,MMX]


PCMPGTB mm1,mm2/m64           ; 0F 64 /r              [PENT,MMX]

PCMPGTW mm1,mm2/m64           ; 0F 65 /r              [PENT,MMX]

PCMPGTD mm1,mm2/m64           ; 0F 66 /r              [PENT,MMX]


PCMPEQB xmm1,xmm2/m128        ; 66 0F 74 /r     [WILLAMETTE,SSE2]

PCMPEQW xmm1,xmm2/m128        ; 66 0F 75 /r     [WILLAMETTE,SSE2]

PCMPEQD xmm1,xmm2/m128        ; 66 0F 76 /r     [WILLAMETTE,SSE2]


PCMPGTB xmm1,xmm2/m128        ; 66 0F 64 /r     [WILLAMETTE,SSE2]

PCMPGTW xmm1,xmm2/m128        ; 66 0F 65 /r     [WILLAMETTE,SSE2]

PCMPGTD xmm1,xmm2/m128        ; 66 0F 66 /r     [WILLAMETTE,SSE2]


The PCMPxxx instructions all treat their operands as vectors of bytes, words, or doublewords; corresponding elements of the source and destination are compared, and the corresponding element of the destination (first) operand is set to all zeros or all ones depending on the result of the comparison.


The source operand can be an MMX technology register or a 64-bit memory location, or it can be an XMM register or a 128-bit memory location. The destination operand can be an MMX technology register or an XMM register.


PCMPxxB treats the operands as vectors of bytes.

PCMPxxW treats the operands as vectors of words.

PCMPxxD treats the operands as vectors of doublewords.

PCMPEQx sets the corresponding element of the destination operand to all ones if the two elements compared are equal.

PCMPGTx sets the destination element to all ones if the element of the first (destination) operand is greater (treated as a signed integer) than that of the second (source) operand.


PCMPEQB  Compare packed bytes for equal

PCMPEQW Compare packed words for equal

PCMPEQD  Compare packed doublewords for equal

PCMPGTB  Compare packed signed byte integers for greater than

PCMPGTW Compare packed signed word integers for greater than

PCMPGTD  Compare packed signed doubleword integers for greater than


EXAMPLE:

pcmpeqb xmm1 xmm2