Set t1 to contents of effective memory word address
lw
Operands
reg, [imm(reg) / (reg) / imm / id / %lo(id)], (reg)Variants
- Set t1 to contents of effective memory word address lw t1, -100(t2)
- Load Word : Set t1 to contents of effective memory word address lw t1,(t2)
- Load Word : Set t1 to contents of effective memory word address lw t1,-100
- Load Word : Set t1 to contents of effective memory word address lw t1,10000000
- Load Word : Set t1 to contents of memory word at label's address lw t1,label
- Load from Address lw t1,%lo(label)(t2)
This example runs on RV64.
# value is initialized and naturally aligned for this operation.
.data
value: .word 0x817fff80
.text
la t0, value
# The word 0x817FFF80 sign-extends in RV64; lw writes −2122317952 (0xFFFFFFFF817FFF80) to t2.
lw t2, 0(t0)