xxgenpcvbm

VSX Vector Generate Permute Control Vector from Byte Mask

xxgenpcvbm XT, XB, IMM

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

xxgenpcvbm vs1, vs3, 1

Encoding

Binary Layout
60
0
XT
6
IMM
11
XB
16
916
21
 
Format XX2-form
Opcode 0xF0000728
Extension VSX
Registers Altered MSR

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