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.
Encoding
Binary Layout
000100
0:5
VRT
6:10
//
11:15
RA
16:20
10100
21:25
001100
26:31
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register (index) -
RB
Source Vector Register
Example
vextuwrx v1, r4, r5
Related
More in VMX (AltiVec)
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.