vinsblx
Vector Insert Byte from GPR using GPR-specified Left-Index VX-form
Inserts a byte from a general-purpose register into a vector register at an index specified by another general-purpose register.
Details
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.
Pseudocode 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.
Example
Encoding
Operands
-
VRT
Target Vector Register -
RA
Source General Purpose Register (index) -
RB
Source General Purpose Register (data)