vexpandqm
Vector Expand Quadword Mask
Expands bits from a GPR mask into a quadword-element vector.
Details
The vexpandqm instruction expands the mask bit from VSR[VRB+32] to all elements in VSR[VRT+32]. If the mask bit is 1, all elements are set to 0xFFFFFFFFFFFFFFFF; if the mask bit is 0, all elements are set to 0x0000000000000000.
Pseudocode Operation
Programming Note
The vexpandqm instruction is used to set all elements in a vector register based on the value of a single mask bit. Ensure that the Vector Facility (VEC) is enabled in the MSR before using this instruction; otherwise, it will raise an exception. This instruction is useful for quickly initializing vectors with either all ones or all zeros based on a condition.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register