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 believe implementing ldaxp/stlxp in the backend and using them to expand 128-bit CAS (and other 128-bit atomics, except for atomic load) would be the preferable route, not adding explicit assembly implementations to libgcc. Alexander