Home | History | Annotate | Download | only in atomic
History log of /src/common/lib/libc/arch/aarch64/atomic/__aarch64_lse.S
RevisionDateAuthorComments
 1.7  06-Aug-2022  riastradh aarch64: Implement __aarch64_casN_sync.

gcc generates calls to this symbol in programs that use
__sync_*_compare_and_swap, which require full sequential consistency
barriers, including store-before-load ordering on both sides of the
atomic; none of the release/acquire operations guarantee that, so we
have to insert explicit DMB instructions.

Note: gcc's own definition omits some of the DMB instructions, but I
can't prove that it's correct that way -- stores preceding the CAS
must complete before the load part of the CAS, and the store part of
the CAS must complete before loads following the CAS. Maybe there's
some way to prove that one of these orderings is guaranteed some
other way than a DMB but I'm not seeing it, and store-before-load
ordering is hard to understand.

Patch by skrll@ based on a patch by mrg@, soliloquy in commit message
by me.
 1.6  23-Jul-2022  skrll whitespace
 1.5  18-Jun-2022  skrll be consistent about comparing loaded value against expected old value
register ordering
 1.4  18-Jun-2022  skrll Fix some register usage
 1.3  16-Jun-2022  skrll remove stray 'w'
 1.2  08-Aug-2021  skrll Whitespace
 1.1  27-Apr-2021  skrll Provide all the LSE operation fuctions. The use of LSE instructions is
currently disabled.

RSS XML Feed