vinshvlx
Vector Insert Halfword from VSR using GPR - specified Left-Index VX-form
vinshvlx VRT,RA,VRB
Inserts halfword from a vector register into another vector register at a position specified by a general-purpose register.
Encoding
Binary Layout
0
VRT
RA
VRB
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register -
VRB
Source Vector Register -
VSRT
Target Vector Register -
VSRC1
Source Vector Register -
VSRC2
Source Vector Register
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The instruction inserts the contents of bits 48:63 of VSR[VRB+32] into byte elements index:index+1 of VSR[VRT+32], where index is the contents of bits 60:63 of GPR[RA].
Operation
if MSR.VEC=0 then
Vector_Unavailable()
index ← GPR[RA].bit[60:63]
src.byte[0:15] ← 0
VSR[VRT+32].byte[index:index+1] ← VSR[VRB+32].bit[48:63]
Programming Note
This instruction is used to insert the upper halfword of a vector register into specific byte elements of another vector register, based on an index derived from a general-purpose register. Ensure that the Vector Facility (MSR.VEC) is enabled; otherwise, a Vector_Unavailable exception will be raised. The index must be within the valid range for vector operations to avoid undefined behavior.