vpermr
Vector Permute Right
Bitwise byte shuffle similar to vperm but for little-endian access optimization.
Details
The Vector Permute Right (vpermr) instruction performs a right permutation on the elements of a vector register.
Pseudocode Operation
// VMX vector operation -> v1
Programming Note
The vpermr instruction is used to perform a right permutation on the elements of a vector register. It is commonly used in scenarios where data needs to be shifted or rotated within a vector for operations like cryptography, signal processing, or custom algorithms. Ensure that the input vector is properly aligned and that the operation does not exceed the bounds of the vector register to avoid undefined behavior. This instruction operates at user privilege level and may raise exceptions if the alignment requirements are not met.
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