vpermxor
Vector Permute and Exclusive-OR
vpermxor vD, vA, vB, vC
Permutes bytes from vA and vB, then XORs with vC. Used for finite field arithmetic.
Details
The vpermxor instruction performs a permute and exclusive OR operation on the contents of three vector registers (VRA, VRB, VRC) and stores the result in another vector register (VRT).
Pseudocode Operation
Programming Note
The vpermxor instruction requires the Vector Facility to be enabled in the MSR. Ensure that the index values in VRC do not exceed 15 to avoid undefined behavior. This instruction operates on byte-level data and is useful for complex data transformations involving permutation and bitwise operations.
Example
vpermxor vd, va, vb, vc
Encoding
Binary Layout
0
0
VRT
6
VRA
11
VRB
16
VRC
21
45
26
Operands
-
vD
Target -
vA
Src A -
vB
Src B -
vC
Permute -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register -
VRC
Control Vector Register