lxsdx

Load VSX Scalar Doubleword Indexed

lxsdx XT,RA,RB

Loads a doubleword from memory into a VSX scalar register.

Details

The lxsdx instruction loads a doubleword from memory into the specified VSX scalar register. The address is calculated by adding the contents of two general-purpose registers, RA and RB. If RA is zero, the base address is considered to be zero.

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] ← 0x0000_0000_0000_0000

Programming Note

The lxsdx instruction is commonly used to load a doubleword from memory into a VSX scalar register. Ensure that the VSX facility is enabled by checking and setting the appropriate bit in the MSR register. Be cautious of alignment requirements; while the instruction can handle unaligned accesses, performance may be improved with aligned data. This instruction operates at user privilege level but will raise an exception if the VSX facility is not available.

Example

lxsdx vs1, r4, r5

Encoding

Binary Layout
0
0
T
6
RA
11
RB
16
 
Format X-form
Opcode 0x7C000498
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target VSX Scalar Register
  • RA
    Source General Purpose Register (Base Address)
  • RB
    Source General Purpose Register (Index)