ld
Load Doubleword
ld RT, DS(RA)
Loads a doubleword (64 bits) from memory.
Encoding
Binary Layout
0
0:5
RT
6:10
RA
11:15
DS
16:20
0
21:30
31
31
Operands
-
RT
Target Register -
DS
Displacement (14-bit Signed, Multiple of 4) -
RA
Base Register -
disp
Displacement value
Example
ld r3, 16(r4)
// Load 64-bit value.
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The doubleword in storage addressed by EA is loaded into RT. The effective address (EA) is the sum of RA and disp, sign-extended to 64 bits.
Operation
if 'ld' then
EA ← (RA|0) + EXTS64(DS||0b00)
RT ← MEM(EA, 8)
Programming Note
The ld instruction loads a doubleword from memory into a register. Ensure the address is properly aligned to avoid alignment faults. This instruction operates at user privilege level and will raise an exception if the EA is out of bounds or access permissions are violated.