Skip to content

Commit 80bc7a3

Browse files
Updating with latest textual changes
1 parent 3d10cb4 commit 80bc7a3

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/zilsd.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@ Even if naturally aligned, the memory access might not be performed atomically.
3939

4040
If the effective address is a multiple of 4, then each word access is required to be performed atomically.
4141

42-
To ensure fault handling is possible for the load instructions, it must be ensured that the register which is the source of the base address is not overwritten before the entire operation is complete.
42+
The following table summarizes the required behavior:
43+
44+
[%header]
45+
|===
46+
|Alignment |Word accesses guaranteed atomic? |Can cause misaligned trap?
47+
|8B |yes |no
48+
|4B not 8B |yes |yes
49+
|else |no | yes
50+
|===
51+
52+
To ensure resumable trap handling is possible for the load instructions, the base register must have its original value if a trap is taken. The other register in the pair can have been updated.
4353
This affects x2 for the stack pointer relative instruction and rs1 otherwise.
44-
To guarantee this, if one of the destination registers of the pair is the source register containing the base, it must not be written to before the other register in the pair has been written.
4554

4655
[NOTE]
4756
====
@@ -89,9 +98,10 @@ Zclsd adds the following RV32-only instructions:
8998

9099
=== Use of x0 as operand
91100

92-
LD instructions with destination `x0` are processed as any other load, but the result is discarded entirely. Specifically, a load pair to `x0` does not cause `x1` to be written. For C.LDSP, usage of `x0` as the destination is reserved.
101+
LD and C.LD instructions with destination `x0` are processed as any other load, but the result is discarded entirely and x1 is not written.
102+
For C.LDSP, usage of `x0` as the destination is reserved.
93103

94-
When using `x0` as `src` of SD or C.SDSP, the entire 64-bit operand is zero — i.e., register `x1` is not accessed.
104+
When using `x0` as `src` of SD, C.SD or C.SDSP, the entire 64-bit operand is zero — i.e., register `x1` is not accessed.
95105

96106
=== Exception Handling
97107

0 commit comments

Comments
 (0)