vrlq

Vector Rotate Left Quadword

vrlq vD, vA, vB

Rotates the contents of a vector register left by a specified number of bits.

Details

The vrlq instruction rotates the contents of VSR[VRA+32] left by SH bits, where SH is the contents of bits 57:63 of VSR[VRB+32]. Bits shifted out on the left are shifted in on the right to replace vacated bits.

Pseudocode Operation

if MSR.VEC=0 then
    Vector_Unavailable()
n ←VSR[VRB+32].bit[57:63]
VSR[VRT+32] ←ROTL128(VSR[VRA+32], n)

Programming Note

The vrlq instruction is used to perform a left rotation of 128 bits in a vector register. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. The shift amount is determined by the upper 7 bits of another vector register, so ensure these bits are set correctly to avoid unexpected results.

Example

vrlq vd, va, vb

Encoding

Binary Layout
4
4
vD
6
vA
11
vB
16
260
 
Format VX-form
Opcode 0x10000104
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vA
    Data
  • vB
    Shift
  • VRT
    Target Vector Register
  • VRA
    Source Vector Register
  • VRB
    Source Vector Register