vextractub

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

vextractub RA, vB, UIM

Extracts an unsigned byte from a vector register and places it into the upper byte of another vector register.

Details

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

Pseudocode Operation

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

Programming Note

If the value of UIM is greater than 14, the results are undefined.

Example

vextractub r4, vb, uim

Encoding

Binary Layout
4
0
RA
6
UIM
11
vB
16
525
 
Format VX-form
Opcode 0x1000020D
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • RA
    Target GPR
  • vB
    Source Vector
  • UIM
    Index
  • VRT
    Target Vector Register
  • VRB
    Source Vector Register