Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z
Vol. 2B 4-65
INSTRUCTION SET REFERENCE, N-Z
PCMPGTB/PCMPGTW/PCMPGTD—Compare Packed Signed Integers for
Greater Than
Description
Performs a SIMD signed compare for the greater value of the packed byte, word, or
doubleword integers in the destination operand (first operand) and the source
operand (second operand). If a data element in the destination operand is greater
than the corresponding date element in the source operand, the corresponding data
element in the destination operand is set to all 1s; otherwise, it is set to all 0s. 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.
The PCMPGTB instruction compares the corresponding signed byte integers in the
destination and source operands; the PCMPGTW instruction compares the corre-
sponding signed word integers in the destination and source operands; and the
PCMPGTD instruction compares the corresponding signed doubleword integers in the
destination and source operands.
In 64-bit mode, using a REX prefix in the form of REX.R permits this instruction to
access additional registers (XMM8-XMM15).
Opcode Instruction
64-Bit
Mode
Compat/
Leg Mode Description
0F 64 /r PCMPGTB mm,
mm/m64
Valid Valid Compare packed signed byte
integers in mm and mm/m64
for greater than.
66 0F 64 /r PCMPGTB xmm1,
xmm2/m128
Valid Valid Compare packed signed byte
integers in xmm1 and
xmm2/m128 for greater than.
0F 65 /r PCMPGTW mm,
mm/m64
Valid Valid Compare packed signed word
integers in mm and mm/m64
for greater than.
66 0F 65 /r PCMPGTW xmm1,
xmm2/m128
Valid Valid Compare packed signed word
integers in xmm1 and
xmm2/m128 for greater than.
0F 66 /r PCMPGTD mm,
mm/m64
Valid Valid Compare packed signed
doubleword integers in mm and
mm/m64 for greater than.
66 0F 66 /r PCMPGTD xmm1,
xmm2/m128
Valid Valid Compare packed signed
doubleword integers in xmm1
and xmm2/m128 for greater
than.