vextuwrx

Vector Extract Unsigned Word to GPR using GPR-specified Right-Index VX-form

vextuwrx VRT,RA,RB

Extracts an unsigned word from a vector register and places it into a general-purpose register.

Details

Extracts a 32-bit unsigned word from vector register RB using a byte-offset index contained in GPR RA, and places the extracted value into GPR VRT. The index specifies which 4-byte element to extract from the 128-bit vector. This instruction requires VMX/AltiVec support and no condition flags are affected.

Pseudocode Operation

idx ← (RA)[29:31] || 0b00
VRT ← (RB)[idx*8 : idx*8+31]

Programming Note

Use vextuwrx to extract a 32-bit unsigned word from a vector register using a right-index specified by a GPR. Ensure the index is correctly calculated to avoid out-of-bounds access. The result is zero-extended to 64 bits before being stored in the target GPR.

Example

vextuwrx v1, r4, r5

Encoding

Binary Layout
000100
0
VRT
6
//
11
RA
16
10100
21
001100
26
 
Format VX-form
Opcode 0x1000078D
Extension VMX (AltiVec)

Operands

  • VRT
    Target Vector Register
  • RA
    Source General Purpose Register (index)
  • RB
    Source Vector Register