vinswlx
Vector Insert Word from GPR using GPR-specified Left-Index VX-form
vinswlx VRT,RA,RB
Inserts the contents of bits 32:63 of a general-purpose register into byte elements of a vector register based on an index specified in another general-purpose register.
Encoding
Binary Layout
4
0:5
VRT
6:10
RA
11:15
RB
16:31
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register containing the index -
RB
Source General Purpose Register containing the data to insert
Example
vinswlx v1, r4, r5
Related
More in VMX (AltiVec)
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The instruction inserts the contents of bits 32:63 of GPR[RB] into byte elements index:index+3 of VSR[VRT+32], where index is the value of bits 60:63 of GPR[RA].
Operation
if MSR.VEC=0 then
Vector_Unavailable()
index ← GPR[RA].bit[60:63]
VSR[VRT+32].byte[index:index+3] ← GPR[RB].bit[32:63]
Programming Note
This instruction is used to insert the upper 32 bits of a general-purpose register (GPR) into specific byte elements of a vector register. Ensure that the index specified by the top 4 bits of GPR[RA] is within the valid range for the target vector register. This operation requires the Vector Facility to be enabled; otherwise, it will raise an exception.