lwax

Load Word Algebraic Indexed X-form

lwax RT,RA,RB

Loads a word from memory into a register using an indexed address.

Details

The lwax instruction loads a word from the effective address (EA) calculated as (RA|0) + (RB) and places it into RT. The EA is formed by concatenating the upper 32 bits of RA with zeros, then adding RB to this value.

Pseudocode Operation

if RA = 0 then
    b ← 0
else
    b ← (RA)
EA ← b + (RB)
RT ← EXTS(MEM(EA, 4))

Programming Note

The lwax instruction is commonly used for loading a word from memory into a register using an indexed addressing mode. Ensure that the base address in RA is properly aligned to avoid misaligned access exceptions. This instruction operates at user privilege level and can raise an exception if the EA is out of bounds or if there are memory protection violations.

Example

lwax r3, r4, r5

Encoding

Binary Layout
0
0
RT
6
RA
11
DS
16
2
21
 
Format X-form
Opcode 0x7C0002AA
Extension Base

Operands

  • RT
    Target General Purpose Register
  • RA
    Source General Purpose Register (base address)
  • RB
    Source General Purpose Register (offset)