3-480
INSTRUCTION SET REFERENCE
PADDSB/PADDSWPacked Add with Saturation (Continued)
Operation
IF instruction is PADDSB
THEN
DEST(7..0)
<
SaturateToSignedByte(DEST(7..0) + SRC (7..0)) ;
DEST(15..8)
<
SaturateToSignedByte(DEST(15..8) + SRC(15..8) );
DEST(23..16)
<
SaturateToSignedByte(DEST(23..16)+ SRC(23..16) );
DEST(31..24)
<
SaturateToSignedByte(DEST(31..24) + SRC(31..24) );
DEST(39..32)
<
SaturateToSignedByte(DEST(39..32) + SRC(39..32) );
DEST(47..40)
<
SaturateToSignedByte(DEST(47..40)+ SRC(47..40) );
DEST(55..48)
<
SaturateToSignedByte(DEST(55..48) + SRC(55..48) );
DEST(63..56)
<
SaturateToSignedByte(DEST(63..56) + SRC(63..56) );
ELSE { (* instruction is PADDSW *)
DEST(15..0)
<
SaturateToSignedWord(DEST(15..0) + SRC(15..0) );
DEST(31..16)
<
SaturateToSignedWord(DEST(31..16) + SRC(31..16) );
DEST(47..32)
<
SaturateToSignedWord(DEST(47..32) + SRC(47..32) );
DEST(63..48)
<
SaturateToSignedWord(DEST(63..48) + SRC(63..48) );
FI;
Intel C/C++ Compiler Intrinsic Equivalents
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_paddsb(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_adds_pi8(__m64 m1, __m64 m2)
Add the eight signed 8-bit values in m1 to the eight signed 8-bit values in m2 and saturate.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_paddsw(__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_adds_pi16(__m64 m1, __m64 m2)
Add the four signed 16-bit values in m1 to the four signed 16-bit values in m2 and saturate.
Flags Affected
None.