stdu

Store Doubleword with Update DS-form

stdu RS,disp(RA)

Stores a doubleword from a register to memory and updates the base address register.

Details

Stores a 64-bit doubleword from register RS to memory at the address computed from RA plus the sign-extended displacement, then updates RA with the effective address. The displacement is a 14-bit signed value (DS field), scaled by 8 to form a byte offset. This instruction is commonly used in prologue/epilogue code to allocate/deallocate stack space while storing values. No condition or status registers are affected.

Pseudocode Operation

EA ← (RA) + EXTS(DS || 0b00); M[EA:EA+7] ← (RS); RA ← EA

Programming Note

The base register (RA) is updated with the effective address after the memory access. RA must not be 0 and must differ from the destination register; violating this constraint produces undefined results.

Example

stdu r3, disp(RA)

Encoding

Binary Layout
0
0
RS
6
RA
11
DS
16
1
31
 
Format DS-form
Opcode 0xF8000001
Extension Base

Operands

  • RS
    Source General Purpose Register
  • RA
    Base Address General Purpose Register
  • disp
    Displacement value