xxextractuw
VSX Vector Extract Unsigned Word
Extracts an unsigned word from a vector register and places it into another vector register.
Details
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.
Pseudocode Operation
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.
Example
Encoding
Operands
-
RT
Target GPR -
XS
Source VSR -
UIM
Element Index -
XT
Target Vector Register -
XB
Source Vector Register