vextuwlx

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

vextuwlx RT,RA,VRB

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

Details

The instruction extracts an unsigned word from the specified byte index in VSR[VRB+32] and places it into bits 32:63 of GPR[RT]. The contents of bits 0:31 of GPR[RT] are set to 0. If MSR.VEC=0, a Vector_Unavailable() exception is raised.

Pseudocode Operation

if MSR.VEC=0 then
    Vector_Unavailable()
index ← GPR[RA].bit[60:63]
GPR[RT] ← EXTZ64(VSR[VRB+32].byte[index:index+3])
if index > 12 then
    undefined

Programming Note

This instruction is used to extract an unsigned word from a vector register and place it into the upper half of a general-purpose register. Ensure that the MSR.VEC bit is set to avoid a Vector_Unavailable exception. The index for extraction is derived from the top 4 bits of the RA register, so be cautious with the value in RA to prevent undefined behavior when the index exceeds 12.

Example

vextuwlx r3, r4, v3

Encoding

Binary Layout
0
4
RT
6
RA
11
VRB
16
 
Format VX-form
Opcode 0x1000068D
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • RT
    Target General Purpose Register
  • RA
    Source General Purpose Register (contains the index)
  • VRB
    Vector Register B