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.

Details

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].

Pseudocode 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.

Example

vinswlx v1, r4, r5

Encoding

Binary Layout
4
0
VRT
6
RA
11
RB
16
 
Format VX-form
Opcode 0x1000028F
Extension VMX (AltiVec)
Registers Altered None

Operands

  • VRT
    Target Vector Register
  • RA
    Source General Purpose Register containing the index
  • RB
    Source General Purpose Register containing the data to insert