__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined on aarch64

Andrew Haley aph@redhat.com
Thu Jun 29 14:18:00 GMT 2017

On 29/06/17 15:05, Toebs Douglass wrote:
> I wrote:
>> I may be utterly, utterly wrong, but I think what's happened makes
>> perfect sense at each step of the way but has led to an outcome which
>> is crazy.  I publish a lock-free data structure library and I must
>> specifically avoid libatomic.
> Sorry to be so unconstructive, though.  I don't know enough about GCC
> and libatomic to be able to meaningfully make other proposals; I can
> only write as an end user.

Well, yeah.  We can only really blame ARM for this: they provided a
double-word CAS but no way to define a double-word atomic load which
does not also store.  I hesitate to place blame on the ARM architects,
a splendid and diligent bunch, but there it is.  I have no idea why
LDXP doesn't work as an atomic load, but it does not.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the Gcc-help mailing list