vupkhsb

Vector Unpack High Signed Byte

vupkhsb vD, vB

Unpacks the high signed byte from each element of a vector register into halfwords of another vector register.

Details

For vupkhsb, the signed integer value in byte element i of VSR[VRB+32] is sign-extended and placed into half-word element i in VSR[VRT+32].

Pseudocode Operation

if MSR.VEC=0 then
    Vector_Unavailable()
do i = 0 to 7
    VSR[VRT+32].hword[i] ←EXTS16(VSR[VRB+32].byte[i])
end

Programming Note

This instruction is used to unpack the high signed bytes from one vector register into half-words of another. Ensure that the Vector Facility (MSR.VEC) is enabled; otherwise, a Vector Unavailable exception will be raised. The operation processes each byte element, sign-extending it to a half-word, which can affect the result if the original byte values are negative.

Example

vupkhsb vd, vb

Encoding

Binary Layout
0
0
VRT
6
VRB
11
18
16
LI
21
AA
30
LK
31
 
Format VX-form
Opcode 0x1000020E
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vB
    Source
  • VRT
    Target Vector Register
  • VRB
    Source Vector Register