__atomic_ builtins for 64-bit types in 32-bit mode

Hi,

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?

Thanks,

–kcc

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

x86 I assume? That requires cmpxchg8, which needs at least Pentiumish
feature set. Does using -march help?

Joerg

> 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

x86 I assume? That requires cmpxchg8, which needs at least Pentiumish
feature set. Does using -march help?

I tried -march=native -- no difference.

--kcc

Folks,

Any other suggestion w.r.t _atomic builtins for 64-bit types in 32-bit mode?

–kcc

Who can send me the checker-270.tar.bz2?
thanks very much.

BRs

Howard Ling (凌欢)

Beyond 'don't use them'? The gcc-compatible atomic builtins are implemented solely to support the poor design choices in libstdc++. They can not be used safely with C11 code because they do not require _Atomic-qualified types and so do not respect the stricter alignment and padding requirements that these types may require.

David