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.

Encoding

Binary Layout
0
0:5
VRT
6:10
VRA
11:15
VRB
16:20
VRC
21:25
45
26:31
 
Format VA-form
Opcode 0x1000002D
Extension Vector Crypto

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

Example

vpermxor vd, va, vb, vc

Registers Altered

MSR

Related

More in Vector Crypto

Reference

Description

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.

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.