vpkuhus
Vector Pack Unsigned Halfword Unsigned Saturate
vpkuhus vD, vA, vB
Saturates 8 halfwords to 16 unsigned bytes.
Details
The vpkuhus instruction packs unsigned halfwords from two source vectors into a destination vector, performing unsigned saturation if necessary.
Pseudocode Operation
Programming Note
The vpkuhus instruction is used to pack unsigned halfwords from two source vectors into a destination vector, with saturation applied if the values exceed 8 bits. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, it will raise an exception. The operation processes each halfword from the input vectors and clamps the result to fit within an 8-bit unsigned integer range.
Example
vpkuhus vd, va, vb
Encoding
Binary Layout
4
0
vD
6
vA
11
vB
16
142
21
Operands
-
vD
Target -
vA
Src A -
vB
Src B