3-556
INSTRUCTION SET REFERENCE
PSRAW/PSRAD—Packed Shift Right Arithmetic (Continued)
Operation
IF instruction is PSRAW
THEN
DEST(15..0)
<
SignExtend (DEST(15..0) >> COUNT);
DEST(31..16)
<
SignExtend (DEST(31..16) >> COUNT);
DEST(47..32)
<
SignExtend (DEST(47..32) >> COUNT);
DEST(63..48)
<
SignExtend (DEST(63..48) >> COUNT);
ELSE { (*instruction is PSRAD *)
DEST(31..0)
<
SignExtend (DEST(31..0) >> COUNT);
DEST(63..32)
<
SignExtend (DEST(63..32) >> COUNT);
FI;
Intel C/C++ Compiler Intrinsic Equivalents
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psraw (__m64 m, __m64 count)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_sraw_pi16 (__m64 m, __m64 count)
Shifts four 16-bit values in m right the amount specified by count while shifting in the sign bit.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psrawi (__m64 m, int count)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_srai_pi16 (__m64 m, int count)
Shifts four 16-bit values in m right the amount specified by count while shifting in the sign bit.
For the best performance, count should be a constant.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psrad (__m64 m, __m64 count)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_sra_pi32 (__m64 m, __m64 count)
Shifts two 32-bit values in m right the amount specified by count while shifting in the sign bit.
Pre-4.0 Intel C/C++ Compiler intrinsic:
__m64 _m_psradi (__m64 m, int count)
Version 4.0 and later Intel C/C++ Compiler intrinsic:
__m64 _mm_srai_pi32 (__m64 m, int count)
Shifts two 32-bit values in m right the amount specified by count while shifting in the sign bit.
For the best performance, count should be a constant.