lxvdsx

Load VSX Vector Doubleword and Splat Indexed

lxvdsx XT, RA, RB

Loads a doubleword from memory and splats it into two elements of a VSX vector register.

Details

Loads a doubleword from memory at the address computed from RA+RB and splats it across two doubleword elements in the VSX vector register XT. The effective address is formed by adding the contents of RA (or 0 if RA=0) and RB. The 64-bit value is replicated into both elements of the 128-bit VSX register. This VSX extension instruction does not affect condition registers.

Pseudocode Operation

EA ← (RA = 0) ? RB : RA + RB
doubleword ← [EA]
XT[0:63] ← doubleword
XT[64:127] ← doubleword

Programming Note

The lxvdsx instruction is commonly used to load a doubleword from memory and replicate it across both elements of a VSX vector register. Ensure that the VSX facility is enabled (MSR.VSX=1) to avoid exceptions. The effective address must be aligned to an 8-byte boundary for optimal performance, although unaligned accesses are supported with potential performance penalties.

Example

lxvdsx vs1, r4, r5

Encoding

Binary Layout
31
0
XT
6
RA
11
RB
16
332
21
TX
31
 
Format X-form
Opcode 0x7C000298
Extension VSX
Registers Altered CR0, XER

Operands

  • XT
    Target
  • RA
    Base
  • RB
    Index
  • VX
    Destination Vector Register