Skip to content

Commit

Permalink
Added requirement for 4B accesses to be atomic if 4B aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-herber-nxp committed Jul 4, 2024
1 parent 3d68b8e commit 0a9df50
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zilsd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ The Zilsd extension adds the following RV32-only instructions:

[NOTE]
====
As the access size is 64-bit, accesses are only considered naturally aligned for effective addresses that are a multiple of 8. In this case, these instruction are guaranteed to not raise an address-misaligned exception.
As the access size is 64-bit, accesses are only considered naturally aligned for effective addresses that are a multiple of 8.
In this case, these instruction are guaranteed to not raise an address-misaligned exception.
Even if naturally aligned, the memory access might not be performed atomically.
====

If the effective address is a multiple of 4, then each word access is required to be performed atomically.
The LD instruction must however write the loaded data to the pair of destination registers atomically to ensure fault handling is possible.

[NOTE]
====
Implementations may need to crack these instructions, and perform two memory operations in sequence. Therefore, implementations are not required to ensure atomicity when storing to memory. However, writing to both registers written by a 64-bit load must happen atomically to ensure fault handling is possible.
If an implementation performs a doubleword access atomically, the mentioned atomicity requirements are inherently fulfilled.
====

[[zcmlsd, Zcmlsd]]
Expand Down

0 comments on commit 0a9df50

Please sign in to comment.