vsl
Vector Shift Left
Shifts the contents of a vector register left by a specified number of bits.
Details
The contents of VSR[VRA+32] are shifted left by the number of bits specified in bits 125:127 of VSR[VRB+32]. Bits shifted out of bit 0 are lost, and zeros are supplied to the vacated bits on the right. The result is placed into VSR[VRT+32], except if, for any byte element in VSR[VRB+32], the low-order 3 bits are not equal to the shift amount, then VSR[VRT+32] is undefined.
Pseudocode Operation
Programming Note
The vsl instruction shifts the contents of a vector register left by a specified number of bits. Ensure that the shift amount is consistent across all byte elements in the control vector to avoid undefined results. This instruction requires the Vector Facility (MSR.VEC) to be enabled; otherwise, it will raise an exception.
Example
Encoding
Operands
-
vD
Target -
vA
Data -
vB
Shift Count -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Shift Amount Vector Register