Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from ved-rivos/mem_order
Browse files Browse the repository at this point in the history
AMOCAS release consistency
  • Loading branch information
ved-rivos committed Aug 6, 2023
2 parents 9d13d9e + 5d3e233 commit 315c044
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion zacas.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,23 @@ is not naturally aligned.

Just as for AMOs in the A extension, the `AMOCAS.W/D/Q` optionally provide
release consistency semantics, using the `aq` and `rl` bits, to help implement
multiprocessor synchronization.
multiprocessor synchronization. The memory operation performed by an
`AMOCAS.W/D/Q`, when successful, has acquire semantics if `aq` bit is 1 and has
release semantics if `rl` bit is 1. The memory operation performed by an
`AMOCAS.W/D/Q`, when not successful, has acquire semantics if `aq` bit is 1 but
does not have release semantics, regardless of `rl`.

A FENCE instruction may be used to order the memory read access and, if
produced, the memory write access by an `AMOCAS.W/D/Q` instruction.

[NOTE]
====
An unsuccessful `AMOCAS.W/D/Q` may either not perform a memory write or may
write back the old value loaded from memory. The memory write, if produced, does
not have release semantics, regardless of `rl`.
====

An `AMOCAS.W/D/Q` instruction always requires write permissions.

<<<

Expand Down

0 comments on commit 315c044

Please sign in to comment.