vclrlb
Vector Clear Left Bytes
vclrlb vD, vA, RB
Clears the leftmost bytes in a vector register based on the value in a general-purpose register.
Details
The contents of VSR[VRA+32] are placed into VSR[VRT+32] with the leftmost 16-N bytes set to 0, where N is the integer value in GPR[RB] or 16 if GPR[RB] > 15.
Pseudocode Operation
Programming Note
The vclrlb instruction is useful for clearing the leftmost bytes of a vector register based on the value in GPR[RB]. Ensure that the Vector Facility (MSR.VEC) is enabled; otherwise, a Vector_Unavailable exception will be raised. Be cautious with alignment and ensure that the values in VRA and VRT are correctly set to avoid unintended data manipulation.
Example
vclrlb vd, va, r5
Encoding
Binary Layout
4
0
vD
6
vA
11
RB
16
397
Operands
-
vD
Target -
vA
Source -
RB
Count (GPR) -
VRT
Target Vector Register -
VRA
Source Vector Register