3-483
INSTRUCTION SET REFERENCE
PADDUSB/PADDUSWPacked Add Unsigned with Saturation
(Continued)
Operation
IF instruction is PADDUSB
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 PADDUSW *)
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_paddusb(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_adds_pu8(__m64 m1, __m64 m2)
Add the eight unsigned 8-bit values in m1 to the eight unsigned 8-bit values in m2 and saturate.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_paddusw(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_adds_pu16(__m64 m1, __m64 m2)
Add the four unsigned 16-bit values in m1 to the four unsigned 16-bit values in m2 and saturate.
Flags Affected
None.