stdx

Store Doubleword Indexed X-form

stdx RS,RA,RB

Stores a doubleword from a register to memory using an indexed address.

Details

The stdx instruction stores the contents of register RS into memory at the effective address (EA) calculated as the sum of the contents of registers RA and RB.

Pseudocode Operation

if RA = 0 then
    b ← 0
else
    b ← (RA)
EA ← b + (RB)
MEM(EA, 8) ← (RS)

Programming Note

The stdx instruction is commonly used for storing a doubleword from a register into memory at an address derived from the sum of two registers. Ensure that RA and RB are correctly set to avoid incorrect memory addresses. This instruction operates in user mode and can raise exceptions if there's a protection fault or alignment error.

Example

stdx r3, r4, r5

Encoding

Binary Layout
62
0
RS
6
RA
11
RB
16
 
Format X-form
Opcode 0x7C00012A
Extension Base

Operands

  • RS
    Source General Purpose Register
  • RA
    Base Address General Purpose Register
  • RB
    Index General Purpose Register