vinswvlx
Vector Insert Word from VSR using GPR-specified Left-Index VX-form
vinswvlx VRT,RA,VRB
Inserts a word from a vector register into another vector register at a position specified by a general-purpose register.
Encoding
Binary Layout
0
0:5
VRT
6:10
RA
11:15
VRB
16:31
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register -
VRB
Source Vector Register
Example
vinswvlx v1, r4, v3
Related
More in VMX (AltiVec)
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The contents of bits 32:63 of VSR[VRB+32] are placed into byte elements index:index+3 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]
VSR[VRT+32].byte[index:index+3] ← VSR[VRB+32].bit[32:63]
Programming Note
This instruction is used to insert a 4-byte word from one vector register into another, with the destination index specified by the upper 4 bits of a general-purpose register. Ensure that the MSR.VEC bit is set to enable vector operations; otherwise, a Vector_Unavailable exception will be raised. The source and destination registers must be in the range V32-V63. Be cautious of alignment issues if the index does not align with byte boundaries.