vinsbvlx
Vector Insert Byte from VSR using GPR-specified Left-Index VX-form
vinsbvlx VRT,RA,VRB
Inserts a byte from one vector register into another based on an index specified in a general-purpose register.
Encoding
Binary Layout
000100
0:5
VRT
6:10
RA
11:15
VRB
16:20
00000
21:25
001111
26:31
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register containing the index -
VRB
Source Vector Register
Example
vinsbvlx v1, r4, v3
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 56:63 of VSR[VRB+32] into byte element 'index' 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] ← VSR[VRB+32].bit[56:63]
Programming Note
This instruction is used to insert a byte from one vector register into another, with the target index specified by bits 60-63 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 index must be within the valid range for vector elements to avoid undefined behavior.