vsraq
Vector Shift Right Algebraic Quadword
Shifts the contents of a vector register right algebraically by a specified number of bits.
Details
The vsraq instruction shifts the contents of VSR[VRA+32] right algebraically 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 vsraq instruction is used for performing algebraic right shifts on quadword vector elements. Ensure that the Vector Facility (VEC) bit in the Machine State Register (MSR) is set to 1; otherwise, a Vector_Unavailable exception will be raised. The shift amount is derived from the low-order 7 bits of the second source register, and the result is stored in the destination register. Be cautious with alignment as it affects performance and correctness.
Example
Encoding
Operands
-
vD
Target -
vA
Data -
vB
Shift -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Shift Count Vector Register