3-571
INSTRUCTION SET REFERENCE
PSUBUSB/PSUBUSWPacked Subtract Unsigned with Saturation
(Continued)
Operation
IF instruction is PSUBUSB
THEN
DEST(7..0)
<
SaturateToUnsignedByte (DEST(7..0 SRC (7..0) );
DEST(15..8)
<
SaturateToUnsignedByte ( DEST(15..8) SRC(15..8) );
DEST(23..16)
<
SaturateToUnsignedByte (DEST(23..16) SRC(23..16) );
DEST(31..24)
<
SaturateToUnsignedByte (DEST(31..24) SRC(31..24) );
DEST(39..32)
<
SaturateToUnsignedByte (DEST(39..32) SRC(39..32) );
DEST(47..40)
<
SaturateToUnsignedByte (DEST(47..40) SRC(47..40) );
DEST(55..48)
<
SaturateToUnsignedByte (DEST(55..48) SRC(55..48) );
DEST(63..56)
<
SaturateToUnsignedByte (DEST(63..56) SRC(63..56) );
ELSE { (* instruction is PSUBUSW *)
DEST(15..0)
<
SaturateToUnsignedWord (DEST(15..0) SRC(15..0) );
DEST(31..16)
<
SaturateToUnsignedWord (DEST(31..16) SRC(31..16) );
DEST(47..32)
<
SaturateToUnsignedWord (DEST(47..32) SRC(47..32) );
DEST(63..48)
<
SaturateToUnsignedWord (DEST(63..48) SRC(63..48) );
FI;
Intel C/C++ Compiler Intrinsic Equivalents
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psubusb(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_sub_pu8(__m64 m1, __m64 m2)
Subtract the eight unsigned 8-bit values in m2 from the eight unsigned 8-bit values in m1 and
saturate.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psubusw(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_sub_pu16(__m64 m1, __m64 m2)
Subtract the four unsigned 16-bit values in m2 from the four unsigned 16-bit values in m1 and
saturate.
Flags Affected
None.