lr.d

Operands

reg, (reg)

Load reserved (double word) : Set t1 to the double word at the address in t2 and reserve that address. Pair with sc.d to build an atomic read-modify-write that can be retried (64bit)

Variants

  • Load reserved (double word) : Set t1 to the double word at the address in t2 and reserve that address. Pair with sc.d to build an atomic read-modify-write that can be retried (64bit) lr.d t1, (t2)

This example runs on RV64.

# value is initialized and naturally aligned for this operation.
.data
value: .dword 0x0000000012345678
.text
la t0, value
# Reserve the aligned doubleword at value; t2 receives 305419896.
lr.d t2, (t0)