xxpermx
VSX Vector Permute Extended
xxpermx XT, XA, XB, XC, UIM
Permutes bytes from two source vectors using a control vector and a 3-bit selector.
Details
The xxpermx instruction performs a permute operation on vector elements based on the index vector. The contents of byte element i of VSR[XT] are set to the contents of byte element eidx of src if section equals UIM; otherwise, they are set to 0.
Pseudocode Operation
Programming Note
The following is an example of emulating 256-bit xxperm, where a 256-bit vector is contained in a pair of VSRs. The instruction is capable of emulating up to a 2048-bit xxperm.
Example
xxpermx vs1, vs2, vs3, vs4, uim
Encoding
Binary Layout
1
0
8
6
0
9
/
10
60
32
XT
38
XA
43
XB
48
XC
53
UIM
58
Operands
-
XT
Target -
XA
Src A -
XB
Src B -
XC
Control -
UIM
Selector -
VX1
Target Vector Register -
VX2
Source Vector Register -
VX3
Source Vector Register