xxbrw
Vector Byte-Reverse Word
xxbrw XT,XB
Reverses the bytes of each word in a vector register.
Details
The xxbrw instruction reverses the byte order of each word element in the source vector register and stores the result in the target vector register.
Pseudocode Operation
Programming Note
The xxbrw instruction is used to reverse the byte order of each word in a vector register. Ensure that VSX (Vector Scalar Extensions) is enabled by checking and setting the appropriate bit in the MSR register. This instruction operates on 128-bit vector registers, processing four 32-bit words per operation. Be cautious of alignment requirements; source and target vectors must be properly aligned to avoid exceptions.
Example
xxbrw vs1, vs3
Encoding
Binary Layout
T
6
B
11
BX
16
TX
21
Operands
-
XT
Target Vector Register -
XB
Source Vector Register