Closed diantaowang closed 4 days ago
Please submit a PR that fixes the table. Thank you in advance!
As to your question, the SC might succeed on some implementations, because the LR is allowed to reserve more memory than a single word. (For example, some implementations might reserve the whole cache line and ignore the cache line offset LSBs, so an SC to any word on the same cache line might succeed.) On other implementations, the SC might always fail. So, the text describing this example is correct.
In the latest unprivileged version (riscv-isa-release-b796659-2024-11-14), there is a bug in
Figure 4
ofA.3.3. Atomicity axiom
.The wrong picture is as follows:
The right picture should be:
Before fix it, I have a question about the fourth code snippet in the above figure. The original text (in
A.3.3. Atomicity axiom
) in the specification is as follows:Why the SC instruction in code snippet as follow may sucessed? Obviously, the memory accessed by the SC instruction is not included in the reserved set of the LR instruction. I think the SC instruction must be failed, not likely to succeed.
Thanks!