LR.W
Load Reserved Word
LR.W rd, (rs1)
Loads a word from memory and registers a reservation set for the address.
Details
LR.W loads a word from the memory address in rs1 into rd and registers a reservation on that address. The reservation is used by SC.W to implement load-reserved/store-conditional atomics.
Pseudocode Operation
R[rd] = LoadReserved32(M[R[rs1]]);
Example
LR.W x10, (x11)
Encoding
Binary Layout
00010
31:27
aq
26
rl
25
00000
24:20
rs1
19:15
010
14:12
rd
11:7
0101111
6:0
Operands
-
rd
Destination Register -
rs1
Address