3-570
INSTRUCTION SET REFERENCE
PSUBUSB/PSUBUSWPacked Subtract Unsigned with Saturation
Description
These instructions subtract the individual unsigned data elements (bytes or words) of the source
operand (second operand) from the individual unsigned data elements of the destination operand
(first operand) (refer to Figure 3-82). If the result of an individual subtraction exceeds the range
for the specified unsigned data type, the result is saturated. The destination operand musts be an
MMX technology register; the source operand can be either an MMX technology register
or a quadword memory location.
The PSUBUSB instruction subtracts the unsigned bytes of the source operand from the unsigned
bytes of the destination operand and stores the results to the destination operand. When an indi-
vidual result is less than zero (a negative value), the saturated unsigned byte value of 00H is
written to the destination operand.
The PSUBUSW instruction subtracts the unsigned words of the source operand from the
unsigned words of the destination operand and stores the results to the destination operand.
When an individual result is less than zero (a negative value), the saturated unsigned word value
of 0000H is written to the destination operand.
Opcode
Instruction
Description
0F D8 /r
PSUBUSB mm,
mm/m64
Subtract unsigned packed bytes in mm/m64 from
unsigned packed bytes in mm and saturate.
0F D9 /r
PSUBUSW mm,
mm/m64
Subtract unsigned packed words in mm/m64 from
unsigned packed words in mm and saturate.
Figure 3-82. Operation of the PSUBUSB Instruction
PSUBUSB mm, mm/m64
mm
mm/m64
mm
10000000
11111111
00000000
01111111
00010111
01101000
11111000
00000111
11110001
3006030