__HAVE_64B_ATOMICS and alignment

Florian Weimer fweimer@redhat.com
Thu Apr 13 05:11:00 GMT 2017


On 11/28/2016 12:51 PM, Torvald Riegel wrote:
>> This means that for an LP32 architecture such as i686 which could
>> conceivable provide 64-bit atomics, we might try to perform an atomic
>> operation on a potentially misaligned uint64_t value.
> i686 has no 64b atomic loads or stores.

double loads and stores via the FPU are atomic, and they preserve all 
bit patterns.  (Starting with the Pentium, the FPU was sometimes used to 
implement string copies.)  Hotspot uses this capability to implement 
volatile doubles and longs if SSE is not available, so it better be true. :)

Thanks,
Florian



More information about the Libc-alpha mailing list