Load reserved (word) : Set t1 to the word at the address in t2 and reserve that address. Pair with sc.w to build an atomic read-modify-write that can be retried
lr.w
Operands
reg, (reg)Variants
- Load reserved (word) : Set t1 to the word at the address in t2 and reserve that address. Pair with sc.w to build an atomic read-modify-write that can be retried lr.w t1, (t2)
# value is initialized and naturally aligned for this operation.
.data
value: .word 0x12345678
.text
la t0, value
# Reserve the aligned word at value; t2 receives 305419896.
lr.w t2, (t0)