vinsertw
Vector Insert Word from VSR using Immediate-specified Index
Inserts a word element from one vector register into another vector register at an immediate-specified index.
Details
The contents of word element 1 of VSR[VRB+32] are placed into byte elements UIM:UIM+3 of VSR[VRT+32]. The contents of the remaining byte elements of VSR[VRT+32] are not modified. If the value of UIM is greater than 12, the results are undefined.
Pseudocode Operation
Programming Note
This instruction is used to insert a word from one vector register into another, with the destination index specified by an immediate value. Ensure that the immediate index (UIM) does not exceed 12 to avoid undefined behavior. This operation requires the Vector Facility to be enabled in the Machine State Register (MSR).
Example
Encoding
Operands
-
vD
Target Vector -
vB
Source GPR -
UIM
Index -
VRT
Target Vector Register -
VRB
Source Vector Register