LD.AQRL

RISC-V LD.AQRL Instruction Details

Instruction ManualR-type

Zalasr atomic load of 8 bytes with acquire+release-RCsc ordering (RV64-only).

Instruction Syntax

ld.aqrl rd, (rs1)
Operand Breakdown
Destination rd: receives the sign-extended load result; if rd=x0, the writeback is discarded.
Address register rs1: directly supplies the memory address; Zalasr syntax has no offset immediate.
Encoding field rs2 is fixed to 00000; aq must be 1, and aq/rl only annotate ordering.
ZalasrCache & Synchronization

Instruction Behavior

LD.AQRL is a 8-byte ordered atomic load in the Zalasr standalone load-acquire/store-release family. It atomically reads 64 bits from the address in x[rs1], sign-extends from that width, and writes x[rd]; the syntax has no offset field. The address is naturally aligned to the access width by default unless relaxed by the misaligned atomicity granule PMA; D-width forms are RV64-only.

LD.AQRL Zalasr Decode And Execute Animation

Shows the Zalasr standalone load-acquire AMO encoding, no-offset address syntax, 64-bit data transfer, and aq/rl ordering annotation.

rd
rs1
ld.aqrl
,(
)
Ordering Annotation
aq=1, rl=1 (acquire+release)
31..27
26
25
24..20
19..15
14..12
11..7
6..0
00110
funct5
1
aq
1
rl
00000
rs2=00000
01010
rs1
011
funct3
00101
rd
0101111
opcode
Zalasr Data Path
instruction
0x360532AF
opcode
0101111 -> AMO major opcode
funct5
00110 -> LD.AQRL
aq / rl
1/1 -> acquire+release
operands
rd=t0(x5), rs1=a0(x10)
address
a0(x10) -> 0x0000000000001000 (no offset)
memory read
mem[0x0000000000001000] -> 0x8000000000000002
execute
sign_extend(0x8000000000000002, 64) -> 0x8000000000000002
writeback
t0(x5) = 0x8000000000000002
64-bit Transfer View
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
memory 64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

LD.AQRL loads 64 bits from memory and sign-extends from that width to XLEN before writing rd.

This animation shows ISA-visible Zalasr atomic load/store behavior and aq/rl ordering annotations; it does not model LR/SC reservations, AMO read-modify-write old-value return, caches, buses, or pipeline timing.

Quick Understanding & Search Notes

LD.AQRL uses rs1 directly as the address, atomically reads 8 bytes, and sign-extends into rd; aq/rl bits provide ordering annotations and do not change the loaded data.

The syntax is ld.aqrl rd, (rs1), with no offset field; the address comes from x[rs1].
funct5=00110 selects the Zalasr load-acquire class, funct3=011 selects the LD.AQRL access width, the AMO major opcode is 0101111, and the aq bit must be 1 for Zalasr loads.
The 64-bit loaded value is sign-extended from the source width to XLEN; this D-width form is RV64-only.
aq/rl describe memory ordering only; they do not change the load, sign extension, or rd=x0 architectural behavior.

Common Usage Scenarios

Atomic & Sync

Understand this scenario with real code like «ld.aqrl x5, (x6)».

Concurrency & Multi-core

Understand this scenario with real code like «ld.aqrl x5, (x6)».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

The syntax has no offset immediate; the address comes directly from rs1.
The load result is sign-extended from the 64-bit source width to XLEN; Zalasr has no unsigned load form.
Zalasr load encodings without aq set are RESERVED.
Zalasr is a single ordered atomic load/store instruction, not an LR/SC reservation protocol or an AMO read-modify-write old-value return.

FAQ

Can LD.AQRL use offset(rs1)?

No. The official syntax is ld.aqrl rd, (rs1), with no offset immediate; the address comes directly from rs1.

Is LD.AQRL an LR/SC or AMO read-modify-write operation?

No. These Zalasr instructions are single ordered atomic load/store operations; the animation does not show reservations or old-value return.

Do aq/rl bits change the data result?

No. aq/rl are ordering annotations; the loaded value is still sign-extended from the source width into rd.