vprotd
Vector Packed Rotate Doubleword
Rotates doublewords in XMM register.
Pseudocode Operation
for i in 0..3:
if (imm8 >= 0):
xmm1[i*32+31:i*32] ← ROL(src1[i*32+31:i*32], imm8 & 31)
else:
xmm1[i*32+31:i*32] ← ROR(src1[i*32+31:i*32], (-imm8) & 31)
Example
Encoding
Operands
-
dest
128-bit XMM SIMD register -
src1
128-bit XMM SIMD register or Memory operand -
src2
8-bit signed immediate
Related
More in XOP
Reference
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| 8F RXB.09 0.count.0.00 92 /r | VPROTD xmm1, xmm2/mem128, xmm3 | ||||
| 8F RXB.09 1.src.0.00 92 /r | VPROTD xmm1, xmm2, xmm3/mem128 | ||||
| 8F RXB.08 0.1111.0.00 C2 /r ib | VPROTD xmm1, xmm2/mem128, imm8 |
Description
Doublewords Rotates each doubleword of the source as specified by a count operand and writes the result to the corresponding doubleword of the destination. There are two versions of the instruction, one for each source of the count byte: • VPROTD dest, src, fixed-count • VPROTD dest, src, variable-count For both versions of the instruction, the dest operand is an XMM register specified by ModRM.reg. The fixed count version of the instruction rotates each doubleword of the source operand the number of bits specified by the immediate fixed-count byte operand. All doublewords are rotated the same amount. The src XMM register or memory location is selected by the ModRM.r/m field. The variable count version of the instruction rotates each doubleword of the source by the amount specified in the low order byte of the corresponding doubleword of the variable-count operand vector. Both src and variable-count are configured by XOP.W. • When XOP.W = 0, src is either an XMM register or a128-bit memory location specified by the ModRM.r/m field and variable-count is an XMM register specified by XOP.vvvv. • When XOP.W = 1, src is an XMM register specified by XOP.vvvv and variable-count is either an XMM register or a 128-bit memory location specified by the ModRM.r/m field. When the count value is positive, bits are rotated to the left (toward the more significant bit positions). The bits rotated out to the left of the most significant bit of each source doubleword operand are rotated back in at the right end (least-significant bit) of the doubleword. When the count value is negative, bits are rotated to the right (toward the least significant bit positions). The bits rotated to the right out of the least significant bit of each source doubleword operand are rotated back in at the left end (most-significant bit) of the doubleword. Bits [255:128] of the YMM register that corresponds to the destination are cleared.