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

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

vpermxor vd, va, vb, vc

Encoding

Binary Layout
0
0
VRT
6
VRA
11
VRB
16
VRC
21
45
26
 
Format VA-form
Opcode 0x1000002D
Extension Vector Crypto
Registers Altered MSR

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