vupklpx

Vector Unpack Low Pixel

vupklpx vD, vB

Unpacks low 4 pixels to 4 words.

Details

Unpacks the four low-order pixel values (each 8 bits) from vB into four 32-bit word elements in vD, expanding each pixel into a word with implicit format expansion. This VMX/AltiVec instruction is commonly used in graphics processing and does not affect status registers.

Pseudocode Operation

for i in 0 to 3:
  pixel ← vB[8*i:8*i+7]
  vD[32*i:32*i+31] ← ExpandPixel(pixel)

Programming Note

The vupklpx instruction is used to unpack the low halfwords of a vector register into bytes, sign-extending the first bit and zero-extending the remaining bits. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. This instruction operates on 128-bit vector registers and processes each halfword in the source register to produce four bytes per iteration.

Example

vupklpx vd, vb

Encoding

Binary Layout
4
0
vD
6
0
11
vB
16
974
21
 
Format VX-form
Opcode 0x100003CE
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vB
    Source