This survey only concerns header files that are involved in atomic operations.
commit ae8b3a83fb9de394f609035041cd7a668fda2ab3
arch/arm64/include/asm/atomic.h
which includes
arch/arm64/include/asm/cmpxchg.h
arch/arm64/include/asm/lse.h
arch/arm64/include/asm/atomic-ll-sc.h
arch/arm64/include/asm/barrier.h
The following translation is derived from Rust reference on inline assembly.
=r
lateout(reg)
=&r
out(reg)
+&r
inout(reg)
=Q
latein(reg)
with rewrite into a memref
[{..}]
+Q
latein(reg)
with rewrite into a memref
rZ
xzr
/wzr
xzr
/wzr
r
I
,J
,K
,L
} + r
: See atomic_ll_sc.h
Ir
or rI
is specified, LLVM prefers to consider inserting an immediate of width I/J/K/L
first, then a register as per r
second
I
has higher precedence over r
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
…
TargetLowering::getConstraintPreferences
called by …TargetLowering::ComputeConstraintToUse
called by …llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
: SelectionDAGBuilder::visitInlineAsm
whose purpose is quite clearr
-equivalent constraint, unless benchmarks show deficiency.options(nomem, pure)
memory
options(nomem)
cc
+ memory
atomic_ll_sc
, e.g. __ll_sc_atomic64_dec_if_positive
cc
maps to options(preserve_flags)
options(nostack)
unsigned long
temporaries with =&r
v->counter
where v
is atomic_t*
+Q
Simple place expression really, either being pointer to a place or a variable used for return value.
static inline
functions;
helpers
do
-expression blocks, in a macro