vsrq
Vector Shift Right Quadword
vsrq vD, vA, vB
Shifts the contents of a vector register right by a specified number of bits.
Details
The vsrq instruction shifts the contents of VSR[VRA+32] right by the number of bits specified in the low-order 7 bits of VSR[VRB+32]. The result is placed into VSR[VRT+32].
Pseudocode Operation
Programming Note
The vsrq instruction requires the Vector Facility to be enabled in the MSR register. Ensure that the shift amount is within the range of 0-127 bits to avoid unexpected results. The operation is performed on quadword elements, so alignment considerations are not necessary for this specific instruction.
Example
vsrq vd, va, vb
Encoding
Binary Layout
4
0
vD
6
vA
11
vB
16
517
Operands
-
vD
Target -
vA
Data -
vB
Shift -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register