vbrw

Vector Byte-Reverse Word

vbrw vD, vB

Reverses bytes within each word.

Details

Reverses the byte order within each 32-bit word of the source vector and stores the result in the destination vector. This instruction operates on four words in parallel across the 128-bit vector. No condition flags are affected; this is a VMX/AltiVec instruction.

Pseudocode Operation

vD[0:31] ← vB[24:31] || vB[16:23] || vB[8:15] || vB[0:7]
vD[32:63] ← vB[56:63] || vB[48:55] || vB[40:47] || vB[32:39]
vD[64:95] ← vB[88:95] || vB[80:87] || vB[72:79] || vB[64:71]
vD[96:127] ← vB[120:127] || vB[112:119] || vB[104:111] || vB[96:103]

Example

vbrw vd, vb

Encoding

Binary Layout
4
0
vD
6
0
11
vB
16
1670
21
 
Format VX-form
Opcode 0x10000686
Extension VMX (AltiVec)

Operands

  • vD
    Target
  • vB
    Source