1. "Zam" Standard Extension for Misaligned Atomics, v0.1
This chapter defines the "Zam" extension, which extends the "A" extension by standardizing support for misaligned atomic memory operations (AMOs). On platforms implementing "Zam", misaligned AMOs need only execute atomically with respect to other accesses (including nonatomic loads and stores) to the same address and of the same size. More precisely, execution environments implementing "Zam" are subject to the following axiom:
1.1. Atomicity Axiom for misaligned atomics
If \(r\) and \(w\) are paired misaligned load and store instructions from a hart \(h\) with the same address and of the same size, then there can be no store instruction \(s\) from a hart other than \(h\) with the same address and of the same size as \(r\) and \(w\) such that a store operation generated by \(s\) lies in between memory operations generated by \(r\) and \(w\) in the global memory order. Furthermore, there can be no load instruction \(l\) from a hart other than \(h\) with the same address and of the same size as \(r\) and \(w\) such that a load operation generated by \(l\) lies between two memory operations generated by \(r\) or by \(w\) in the global memory order.
This restricted form of atomicity is intended to balance the needs of applications which require support for misaligned atomics and the ability of the implementation to actually provide the necessary degree of atomicity.
Aligned instructions under "Zam" continue to behave as they normally do under RVWMO.
The intention of "Zam" is that it can be implemented in one of two ways:
