vexpandbm
Vector Expand Byte Mask
Expands the mask from bit 0 of each byte element in the source VSR to all bits in the corresponding element in the target VSR.
Details
The Vector Expand Byte Mask instruction replicates the contents of bit 0 of each byte element in the source vector register (VRB) to all bits in the corresponding byte element in the target vector register (VRT).
Pseudocode Operation
Programming Note
The vexpandbm instruction is useful for creating masks where each byte is either all zeros or all ones based on the least significant bit of the corresponding source byte. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. This operation is efficient for processing data in parallel across multiple bytes.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register