vupklsh

Vector Unpack Low Signed Halfword

vupklsh vD, vB

Unpacks low 4 signed halfwords to 4 signed words.

Details

The Vector Unpack Low Signed Halfword instruction (vupklsh) unpacks the low halfwords from a source vector register into a destination vector register, sign-extending each halfword to form words.

Pseudocode Operation

if MSR.VEC=0 then Vector_Unavailable()
VSR[VRT+32].word[0] ←EXTS32(VSR[VRB+32].hword[4])
VSR[VRT+32].word[1] ←EXTS32(VSR[VRB+32].hword[5])
VSR[VRT+32].word[2] ←EXTS32(VSR[VRB+32].hword[6])
VSR[VRT+32].word[3] ←EXTS32(VSR[VRB+32].hword[7])

Programming Note

This instruction is used to unpack the low halfwords from a source vector register into a destination vector register, sign-extending each halfword to form words. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. The operation targets the high 128 bits of the vector registers, so ensure that VRB and VRT are correctly set for the desired vector elements.

Example

vupklsh vd, vb

Encoding

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

Operands

  • vD
    Target
  • vB
    Source