diff --git a/zacas.adoc b/zacas.adoc index d20ace9..59b04ac 100644 --- a/zacas.adoc +++ b/zacas.adoc @@ -152,9 +152,18 @@ aligned for _quadwords_, eight-byte aligned for _doublewords_, and four-byte aligned for _words_). And the same exception options apply if the address is not naturally aligned. +An `AMOCAS.W/D/Q` generates a memory read access and, if successful, generates +a memory write access to store the _swap_ value. An unsuccessful `AMOCAS.W/D/Q` +may either not perform a memory write or may write back the old value loaded +from memory. An `AMOCAS.W/D/Q` instruction always requires write permissions. + 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`. <<<