3-470
INSTRUCTION SET REFERENCE
PACKSSWB/PACKSSDW—Pack with Signed Saturation
(Continued)
Operation
IF instruction is PACKSSWB
THEN
DEST(7..0)
<
SaturateSignedWordToSignedByte DEST(15..0);
DEST(15..8)
<
SaturateSignedWordToSignedByte DEST(31..16);
DEST(23..16)
<
SaturateSignedWordToSignedByte DEST(47..32);
DEST(31..24)
<
SaturateSignedWordToSignedByte DEST(63..48);
DEST(39..32)
<
SaturateSignedWordToSignedByte SRC(15..0);
DEST(47..40)
<
SaturateSignedWordToSignedByte SRC(31..16);
DEST(55..48)
<
SaturateSignedWordToSignedByte SRC(47..32);
DEST(63..56)
<
SaturateSignedWordToSignedByte SRC(63..48);
ELSE (* instruction is PACKSSDW *)
DEST(15..0)
<
SaturateSignedDoublewordToSignedWord DEST(31..0);
DEST(31..16)
<
SaturateSignedDoublewordToSignedWord DEST(63..32);
DEST(47..32)
<
SaturateSignedDoublewordToSignedWord SRC(31..0);
DEST(63..48)
<
SaturateSignedDoublewordToSignedWord SRC(63..32);
FI;
Intel C/C++ Compiler Intrinsic Equivalents
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_packsswb (__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_packs_pi16(__m64 m1, __m64 m2)
Pack the four 16-bit values from m1 into the lower four 8-bit values of the result with signed
saturation, and pack the four 16-bit values from m2 into the upper four 8-bit values of the result
with signed saturation.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_packssdw (__m64 m1, __m64 m2)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_packs_pi32 (__m64 m1, __m64 m2)
Pack the two 32-bit values from m1 into the lower two 16-bit values of the result with signed
saturation, and pack the two 32-bit values from m2 into the upper two 16-bit values of the result
with signed saturation.
Flags Affected
None.