History log of /seL4-camkes-master/projects/musllibc/arch/aarch64/atomic_arch.h
Revision Date Author Comments
# beb99f3c 04-Aug-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Fix up aarch64_sel4 arch after merge


# fd224a80 23-Feb-2016 Rich Felker <dalias@aerifal.cx>

make aarch64 atomic_arch.h report that it defines pointer-sized ll/sc

at present this is done only for consistency, since this file defines
its own a_cas_p rather than using the new generic one from atomic.h
added in commit 225f6a6b5b7173b6655e4f5d49b5b9fea70bf3bb. these
definitions may however be useful if we ever need to add other
pointer-sized atomic operations.


# 3b277253 31-Jan-2016 Szabolcs Nagy <nsz@port70.net>

better a_sc inline asm constraint on aarch64 and arm

"Q" input constraint was used for the written object, instead of "=Q"
output constraint. this should not cause problems because "memory"
is on the clobber list, but "=Q" better documents the intent and more
consistent with the actual asm code.

this changes the generated code, because different registers are used,
but other than the register names nothing should change.


# 2d14fa39 24-Jan-2016 Szabolcs Nagy <nsz@port70.net>

fix aarch64 atomics to load/store 32bit only

a_ll/a_sc inline asm used 64bit register operands (%0) instead of 32bit
ones (%w0), this at least broke a_and_64 (which always cleared the top
32bit, leaking memory in malloc).


# b17fbd35 23-Jan-2016 Rich Felker <dalias@aerifal.cx>

improve aarch64 atomics

aarch64 provides ll/sc variants with acquire/release memory order,
freeing us from the need to have full barriers both before and after
the ll/sc operation. previously they were not used because the a_cas
can fail without performing a_sc, in which case half of the barrier
would be omitted. instead, define a custom version of a_cas for
aarch64 which uses a_barrier explicitly when aborting the cas
operation. aside from cas, other operations built on top of ll/sc are
not affected since they never abort but rather loop until they
succeed.

a split ll/sc version of the pointer-sized a_cas_p is also introduced
using the same technique.

patch by Szabolcs Nagy.


# aa0db4b5 21-Jan-2016 Rich Felker <dalias@aerifal.cx>

overhaul aarch64 atomics for new atomics framework


# 1315596b 21-Jan-2016 Rich Felker <dalias@aerifal.cx>

refactor internal atomic.h

rather than having each arch provide its own atomic.h, there is a new
shared atomic.h in src/internal which pulls arch-specific definitions
from arc/$(ARCH)/atomic_arch.h. the latter can be extremely minimal,
defining only a_cas or new ll/sc type primitives which the shared
atomic.h will use to construct everything else.

this commit avoids making heavy changes to the individual archs'
atomic implementations. definitions which are identical or
near-identical to what the new shared atomic.h would produce have been
removed, but otherwise the changes made are just hooking up the
arch-specific files to the new infrastructure. major changes to take
advantage of the new system will come in subsequent commits.