lxvwsx

Load VSX Vector Word and Splat Indexed

lxvwsx XT, RA, RB

Loads a 32-bit word and replicates it across the vector.

Details

Loads a 32-bit word from memory at address RA + RB, then replicates it across all four 32-bit word positions in the target VSX register XT. This VSX instruction does not affect condition registers or status fields.

Pseudocode Operation

EA ← RA + RB
word ← [EA:EA+3]
for i in 0 to 3:
  XT[32*i:32*i+31] ← word

Programming Note

The lxvwsx instruction is commonly used for loading a word from memory and replicating it across all elements of a VSX vector register. Ensure that the appropriate privilege levels (MSR.VSX or MSR.VEC) are enabled to avoid exceptions. The instruction requires 4-byte alignment for the memory address; unaligned accesses may result in performance penalties or exceptions depending on the system configuration.

Example

lxvwsx vs1, r4, r5

Encoding

Binary Layout
31
0
XT
6
RA
11
RB
16
364
21
 
Format XX1-form
Opcode 0x7C0002D8
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • RA
    Base
  • RB
    Index