vextractuh

Vector Extract Unsigned Halfword

vextractuh RA, vB, UIM

Extracts a halfword from a vector into a GPR.

Details

The vextractuh instruction is used to extract unsigned halfword elements from a vector register. It allows for the extraction of specific elements based on an immediate index, which specifies the position of the element to be extracted.

Pseudocode Operation

// VMX vector operation -> v1

Programming Note

The vextractuh instruction extracts an unsigned halfword from a vector register at a specified index. Ensure the index is within bounds to avoid undefined behavior. This instruction operates in user privilege level and does not generate exceptions for valid indices.

Example

vextractuh r4, vb, uim

Encoding

Binary Layout
4
0
RA
6
UIM
11
vB
16
589
21
 
Format VX-form
Opcode 0x1000024D
Extension VMX (AltiVec)

Operands

  • RA
    Target GPR
  • vB
    Source Vector
  • UIM
    Index