vslv
Vector Shift Left Variable
vslv VRT,VRA,VRB
Shifts the contents of vector elements left by a variable amount.
Details
The vslv instruction shifts each byte element in VSR[VRA+32] left by a variable amount specified in the corresponding byte element of VSR[VRB+32]. The result is stored in VSR[VRT+32].
Pseudocode Operation
Programming Note
The vslv instruction is used to perform variable left shifts on each byte of a vector register. Ensure that the shift amounts in VSR[VRB+32] are within the valid range (0-7) to avoid unexpected results. This instruction operates at user privilege level and will raise an exception if the Vector Facility is not enabled.
Example
vslv v1, v2, v3
Encoding
Binary Layout
4
0
VRT
6
VRA
11
VRB
16
1860
21
Operands
-
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Shift Amount Vector Register