xxextractuw
VSX Vector Extract Unsigned Word
xxextractuw RT, XS, UIM
Extracts an unsigned word from a vector register and places it into another vector register.
Encoding
Binary Layout
60
0:5
XS
6:10
UIM
11:15
RT
16:20
165
21:31
Operands
-
RT
Target GPR -
XS
Source VSR -
UIM
Element Index -
XT
Target Vector Register -
XB
Source Vector Register
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The instruction extracts the contents of byte elements UIM:UIM+3 from VSR[XB] and places them into word element 1 of VSR[XT]. The remaining byte elements of VSR[XT] are not modified, and the remaining word elements of VSR[XT] are set to 0.
Operation
if MSR.VSX=0 then
VSX_Unavailable()
src ←VSR[32×BX+B].byte[UIM:UIM+3]
VSR[32×TX+T].dword[0] ←EXTZ64(src)
VSR[32×TX+T].dword[1] ←0x0000_0000_0000_0000
Programming Note
This instruction is useful for extracting a specific 4-byte segment from one vector register and placing it into another, while zeroing out the rest of the destination register. Ensure that VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid exceptions. Be cautious with byte alignment; UIM must be a multiple of 4 to correctly extract a word. This instruction operates at the user privilege level and does not generate any exceptions beyond those related to VSX availability.