[PATCH v2] Revert __HAVE_64B_ATOMICS configure check
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Nov 13 22:53:27 GMT 2025
Hi HJ,
>> > This is wrong for x32 which has 64-bit atomic and __WORDSIZE == 32.
>>
>> Why would it be wrong? If 'long' is 4-byte aligned, it has the same issue
>
> Did you mean "long long"? On x32, long is 4-byte.
No, it's about the alignment of 'long'.
>> as 32-bit x86. You need full support for unaligned 64-bit atomics before
>> you can turn it on.
>
> The only difference between x32 and x86-64 is the size of long. If
> x86-64 supports 64-bit atomics, so does x32.
The code does 64-bit atomics with alignment of a 'long'. On 64-bit
targets all is well, but if 'long' is 4-byte aligned, it will fail. So we cannot
use 64-bit atomics on 32-bit targets.
Cheers,
Wilco
More information about the Libc-alpha
mailing list