xxgenpcvbm
VSX Vector Generate Permute Control Vector from Byte Mask
Generates a permute control vector based on the byte mask in VSR[VRB+32].
Details
Generates a permute control vector in XT based on a byte mask contained in XB and an immediate value that specifies the control vector type. The instruction uses the byte mask to determine which bytes are selected for permutation operations. This VSX instruction sets no CR or XER flags.
Pseudocode Operation
XT ← GeneratePermuteControl(XB, IMM)
Programming Note
The xxgenpcvbm instruction is used to generate a permute control vector based on a byte mask. Ensure the VSX facility is enabled by checking and setting the MSR.VSX bit. The operation mode (expansion or compression) and endianness (big or little) are determined by the IMM field. Be cautious with alignment as VSR registers must be properly aligned for operations.
Example
Encoding
Operands
-
XT
Target -
XB
Source -
IMM
Mask -
VRB
Source Vector Register -
vPCV
Target Vector Register -
vMASK
Source Vector Register containing the mask byte -
IMM8
Immediate value specifying the control vector type