vinsblx
Vector Insert Byte from GPR using GPR-specified Left-Index VX-form
vinsblx VRT,RA,RB
Inserts a byte from a general-purpose register into a vector register at an index specified by another general-purpose register.
Encoding
Binary Layout
18
0:5
VRT
6:10
RA
11:15
RB
16:31
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register (index) -
RB
Source General Purpose Register (data)
Example
vinsblx v1, r4, r5
Related
More in VMX (AltiVec)
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The contents of bits 56:63 of GPR[RB] are placed into byte element index of VSR[VRT+32], where index is the contents of bits 60:63 of GPR[RA]. All other byte elements of VSR[VRT+32] remain unchanged.
Operation
if MSR.VEC=0 then
Vector_Unavailable()
index ← GPR[RA].bit[60:63]
src.byte[0:15] ← 0
VSR[VRT+32].byte[index] ← GPR[RB].bit[56:63]
Programming Note
The vinsblx instruction is used to insert a byte from a general-purpose register (GPR) into a vector register, using another GPR to specify the index. Ensure that the MSR.VEC bit is set to 1; otherwise, a Vector_Unavailable exception will be raised. The index must be within the range of 0-15, as it specifies which byte element in the vector register to update. This instruction does not require any special alignment and operates at privilege level 0.