vextractuw

Vector Extract Unsigned Word to VSR using Immediate-specified Index VX-form

vextractuw RA, vB, UIM

Extracts an unsigned word from a vector register and places it into another vector register using an immediate-specified index.

Encoding

Binary Layout
4
0:5
RA
6:10
UIM
11:15
vB
16:20
653
21:31
 
Format VX-form
Opcode 0x1000028D
Extension VMX (AltiVec)

Operands

  • RA
    Target GPR
  • vB
    Source Vector
  • UIM
    Index
  • VRT
    Target Vector Register
  • VRB
    Source Vector Register
  • VX
    Target Vector Register
  • VS
    Source Vector Register
  • UI
    Immediate-specified index

Example

vextractuw r4, vb, uim

Registers Altered

MSR

Related

More in VMX (AltiVec)

Reference

Description

The contents of byte elements UIM:UIM+3 of VSR[VRB+32] are placed into word element 1 of VSR[VRT+32]. The contents of the remaining word elements of VSR[VRT+32] are set to 0.

Operation

if MSR.VEC=0 then
    Vector_Unavailable()
src ←VSR[VRB+32].byte[UIM:UIM+3]
VSR[VRT+32].dword[0] ←EXTZ64(src)
VSR[VRT+32].dword[1] ←0x0000_0000_0000_0000

Programming Note

This instruction is used to extract a 4-byte unsigned word from a vector register and place it into another vector register. Ensure that the Vector Facility (MSR.VEC) is enabled; otherwise, a Vector_Unavailable exception will be raised. The source byte elements must be correctly specified by UIM, and the destination register will have its first dword set to the extracted value while the second dword is zeroed out.