LDR (Load Register)
Loads a value into a Destination register.
32-bit Load Operations (LDR)
Section titled “32-bit Load Operations (LDR)”These instructions load 32-bit values into a register, completely overwriting its previous contents.
Load Immediate
Section titled “Load Immediate”0x10 LDR rDst, imm32
Loads a constant 32-bit value directly into the destination register.
| Argument | Description |
|---|---|
| rDst | The destination register where the data will be stored. |
| imm32 | The 32-bit value to load into the destination register. |
Load Index
Section titled “Load Index”0x11 LDR rDst, [rIdx]
Uses the address stored in rIdx to load a 32-bit value from memory into rDst.
| Argument | Description |
|---|---|
| rDst | The destination register where the data will be stored. |
| rIdx | The register containing the memory address to read from. |
Load Offset
Section titled “Load Offset”0x12 LDR rDst, [rIdx + imm16]
Adds a signed 16-bit offset to rIdx to form an effective address, then loads the 32-bit value at that address into rDst.
| Argument | Description |
|---|---|
| rDst | The destination register where the data will be stored. |
| rIdx | The base register containing the memory address. |
| imm16 | A signed offset (−32,768 to 32,767) added to the base address. |
Load Scaled Offset
Section titled “Load Scaled Offset”0x13 LDR rDst, [rIdx + rOff * imm4]
Computes an effective address as rIdx + (rOff × imm4), then loads the 32-bit value at that address into rDst. This is particularly useful for indexing into arrays with a known element stride.
| Argument | Description |
|---|---|
| rDst | The destination register where the data will be stored. |
| rIdx | The base register containing the memory address. |
| rOff | The register whose value is scaled and added to the base address. |
| imm4 | A 4-bit scale factor (0–15) multiplied with rOff to form the offset. |
Load Absolute
Section titled “Load Absolute”0x14 LDR rDst, [imm32]
Loads the 32-bit value from the fixed memory address specified by imm32.
| Argument | Description |
|---|---|
| rDst | The destination register where the data will be stored. |
| imm32 | The 32-bit absolute address to read from. |