[cfe-dev] __atomic_ builtins for 64-bit types in 32-bit mode

David Chisnall David.Chisnall at cl.cam.ac.uk
Wed Jan 23 01:39:05 PST 2013


On 23 Jan 2013, at 09:04, Kostya Serebryany wrote:

> Looks like __atomic_ builtins for 64-bit types in 32-bit mode
> are not supported in the clang trunk, see e.g. http://llvm.org/bugs/show_bug.cgi?id=15034
> 
> Is there a plan to support them?
> 

The _c11_atomic builtins work, and they implement an API that makes it possible to CORRECTLY implement the C11 requirements (e.g. allowing _Atomic(T) an T to have different ABI requirements, most importantly different padding, and explicit zeroing of padding).  There is no atomic_add_fetch in C11, although this can be implemented with an atomic load, add, atomic compare exchange loop.

David





More information about the cfe-dev mailing list