PSRLx - All Ops - Prev <-> Next

Usage: PSRLx dest,count Modifies flags: None

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

Shift Packed Data Right Logical

PSRLW mm,mm/64 ;0F D1 /r [Pent4]

PSRLW xmm1,xmm2/mem128 ;66 0F D1 /r [Pent4]

PSRLW mm,imm8 ;0F 71 /2 ib [Pent4]

PSRLW xmm1,imm8 ;66 0F 71 /2 ib [Pent4]

PSRLD mm,mm/mem64 ;0F D2 /r [Pent4]

PSRLD xmm1,xmm2/mem128 ;66 0F D2 /r [Pent4]

PSRLD mm,imm8 ;0F 72 /2 ib [Pent4]

PSRLD xmm1,imm8 ;66 0F 72 /2 ib [Pent4]

PSRLQ mm,mm/mem64 ;0F D3 /r [Pent4]

PSRLQ xmm1,xmm2/mem128 ;66 0F D3 /r [Pent4]

PSRLQ mm,imm8 ;0F 73 /2 ib [Pent4]

PSRLQ xmm1,imm8 ;66 0F 73 /2 ib [Pent4]

As the bits in the data elements are shifted right, the empty high-order bits are cleared (set to 0). If the value specified by the count operand is greater than 15 (for words), 31 (for doublewords), or 63 (for a quadword), then the 'dest' operand is set to all 0s.

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.

PSRLW Shift packed words right logical

PSRLD Shift packed doublewords right logical

PSRLQ Shift packed quadword right logical

EXAMPLE:

mov ax 60 | psrlq xmm1 ax | mov ax 25 | psrld xmm2 ax | mov ax 8 | psrlw xmm3 ax