[Bug 230888] Missing 64 bit atomic functions for i386

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Aug 26 10:44:33 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888

David Chisnall <theraven at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |theraven at FreeBSD.org

--- Comment #3 from David Chisnall <theraven at FreeBSD.org> ---
Is there a reason, given that LLVM's atomic.c is in contrib, that we don't just
connect it to the libgcc_s build?

Note that the problem is not just 64-bit.  An increasing amount of x86-64 code
depends on 128-bit atomics (which are single instructions if compiling with
-mcx16, libcalls otherwise).  C11 allows arbitrary sized atomics.  It's allowed
to write _Atomic(struct X) for any arbitrary X.  The code in atomic.c handles
this, though not for atomic types in shared memory (which can't be supported
without changing the ABI - something that WG21 thought through by making
std::atomic a library feature and allowing larger atomic types to be
implemented with an inline lock, and which WG14 completely messed up).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list