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

The lxvdsx instruction loads a doubleword from memory and copies the same data into both doubleword elements of a VSX vector register.

Pseudocode Operation

if MSR.VSX=0 then
    VSX_Unavailable()
EA ←((RA=0) ? 0 : GPR[RA]) + GPR[RB]
load_data ←MEM(EA, 8)
VSR[32×TX+T].dword[0] ←load_data
VSR[32×TX+T].dword[1] ←load_data

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 0x7C00014C
Extension VSX
Registers Altered CR0, XER

Operands

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