Intel 64 and IA-32 Architectures Software Developers Manual Volume 2B, Instruction Set Reference, N-Z

Vol. 2B 4-177
INSTRUCTION SET REFERENCE, N-Z
IF (COUNT > 15)
THEN COUNT 16;
FI;
DEST[15:0] SignExtend(DEST[15:0]
>> COUNT);
(* Repeat shift operation for 2nd through 7th words *)
DEST[127:112] SignExtend(DEST[127:112]
>> COUNT);
PSRAD instruction with 128-bit operand:
COUNT COUNT_SOURCE[63:0];
IF (COUNT > 31)
THEN COUNT 32;
FI;
DEST[31:0] SignExtend(DEST[31:0]
>> COUNT);
(* Repeat shift operation for 2nd and 3rd doublewords *)
DEST[127:96] SignExtend(DEST[127:96]
>>COUNT);
Intel C/C++ Compiler Intrinsic Equivalents
PSRAW __m64 _mm_srai_pi16 (__m64 m, int count)
PSRAW __m64 _mm_sraw_pi16 (__m64 m, __m64 count)
PSRAD __m64 _mm_srai_pi32 (__m64 m, int count)
PSRAD __m64 _mm_sra_pi32 (__m64 m, __m64 count)
PSRAW __m128i _mm_srai_epi16(__m128i m, int count)
PSRAW __m128i _mm_sra_epi16(__m128i m, __m128i count))
PSRAD __m128i _mm_srai_epi32 (__m128i m, int count)
PSRAD __m128i _mm_sra_epi32 (__m128i m, __m128i count)
Flags Affected
None.
Numeric Exceptions
None.
Protected Mode Exceptions
#GP(0) If a memory operand effective address is outside the CS, DS,
ES, FS, or GS segment limit.
(128-bit operations only) If a memory operand is not aligned on
a 16-byte boundary, regardless of segment.