PSRAx - All Ops - Prev <-> Next

Usage: PSRAx dest,count Modifies flags: None

Shifts the bits in the individual data elements (words or doublewords) in the 'dest' operand to the right by the number of bits specified in the 'count' operand.

Packed Data Bit Shift Right Arithmetic

PSRAW mm1,mm2/m64 ; 0F E1 /r [PENT,MMX]

PSRAW mm,imm8 ; 0F 71 /4 ib [PENT,MMX]

PSRAW xmm1,xmm2/m128 ; 66 0F E1 /r [WILLAMETTE,SSE2]

PSRAW xmm,imm8 ; 66 0F 71 /4 ib [WILLAMETTE,SSE2]

PSRAD mm1,mm2/m64 ; 0F E2 /r [PENT,MMX]

PSRAD mm,imm8 ; 0F 72 /4 ib [PENT,MMX]

PSRAD xmm1,xmm2/m128 ; 66 0F E2 /r [WILLAMETTE,SSE2]

PSRAD xmm,imm8 ; 66 0F 72 /4 ib [WILLAMETTE,SSE2]

PSRAx performs arithmetic right shifts of the data elements in the destination (first) operand, moving each bit in the separate elements right by the number of bits specified in the source (second) operand, setting the high-order bits to the value of the original sign bit.

As the bits in the data elements are shifted right, the empty high-order bits are filled with the initial value of the sign bit of the data element. If the value specified by the 'count' operand is greater than 15 (for words) or 31 (for doublewords), each 'dest' data element is filled with the initial value of the sign bit of the element.

The destination operand may be an MMX technology register or an XMM register; the count operand can be either an MMX technology register or an 64-bit memory location, an XMM register or a 128-bit memory location, or an 8-bit immediate.

PSRAW shifts word sized elements. PSRAD shifts doubleword sized elements.

EXAMPLE:

mov ax 14 | psrad xmm1 ax | mov ax 25 | psraw xmm2 ax