You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/zilsd.adoc
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,9 +39,18 @@ Even if naturally aligned, the memory access might not be performed atomically.
39
39
40
40
If the effective address is a multiple of 4, then each word access is required to be performed atomically.
41
41
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.
43
53
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.
45
54
46
55
[NOTE]
47
56
====
@@ -89,9 +98,10 @@ Zclsd adds the following RV32-only instructions:
89
98
90
99
=== Use of x0 as operand
91
100
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.
93
103
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.
0 commit comments