vinserth
Vector Insert Halfword
vinserth vD, vB, UIM
Inserts a halfword from a GPR into a vector.
Details
The Vector Insert Halfword instruction (vinserth) inserts a halfword from one vector register into another vector register at an index specified by an immediate value. The remaining byte elements of the destination vector register are not modified.
Pseudocode Operation
Programming Note
The vinserth instruction is used to insert a halfword from one vector register into another at a specified index. Ensure that the Vector Facility (MSR.VEC) is enabled; otherwise, a Vector_Unavailable exception will be raised. The destination vector's remaining byte elements remain unchanged after the insertion.
Example
vinserth vd, vb, uim
Encoding
Binary Layout
4
0
vD
6
UIM
11
vB
16
845
21
Operands
-
vD
Target Vector -
vB
Source GPR -
UIM
Index