vpermxor
Vector Permute and Exclusive-OR
Permutes bytes from vA and vB, then XORs with vC. Used for finite field arithmetic.
Details
Permutes bytes from vA and vB according to the permutation control vector vC, then XORs the result with vC. This instruction is used for finite field arithmetic operations in cryptographic algorithms within the Vector Crypto extension. No status flags are affected.
Pseudocode Operation
temp ← Permute(vA || vB, vC); vD ← temp XOR vC
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
Encoding
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