vinshlx
Vector Insert Halfword from GPR using GPR-specified Left-Index VX-form
Inserts the high halfword of a general-purpose register into a vector register at a position specified by another general-purpose register.
Details
The contents of bits 48:63 of GPR[RB] are placed into byte elements index:index+1 of VSR[VRT+32], where index is the contents of bits 60:63 of GPR[RA].
Pseudocode Operation
Programming Note
The vinshlx instruction is used to insert the upper halfword of a general-purpose register (GPR) into specific byte elements of a vector register. Ensure that the index specified in bits 60-63 of RA is within valid bounds to avoid undefined behavior. This instruction requires the Vector Facility to be enabled; otherwise, it will raise an exception.
Example
Encoding
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register (index) -
RB
Source General Purpose Register (data)