On 30/05/17 18:41, Alexander Monakov wrote: > On Tue, 30 May 2017, Andrew Haley wrote: >> But why is it not then in libgcc? It's not hard to write it in a >> way that will run on all AArch64 systems. > > Ah, sorry, I was oblivious to availability of 128-bit LL/SC in AArch64 base ISA. > GCC could use those to successfully expand 128-bit CAS, as it already does for > 64-bit and narrower, but at the moment there's no support for ldaxp/stlxp in > GCC (neither for casp, but that's also not a part of the base ISA). I have finally caught up a bit with this thread. I have found both in GCC 7.1.0 and 6.1.0 that which has been written (go figure, right =-) With regard to double word CAS, __atomic will compile and link on aarch64 but only if libatomic is provided, and __sync will not provide double-word CAS at all and linking fails.