]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Pull in r183033 and r183036 from LLVM trunk:
authored <ed@FreeBSD.org>
Sat, 1 Jun 2013 08:07:09 +0000 (08:07 +0000)
committered <ed@FreeBSD.org>
Sat, 1 Jun 2013 08:07:09 +0000 (08:07 +0000)
commit90efd162439bcd23be4ec15b0387320d50cd8cc4
treed2698083846092202691cc905a38935a8be2b1ee
parent28282c63f9f5f659c2d06f5445c514537d2cb7ee
Pull in r183033 and r183036 from LLVM trunk:

  Add support for optimized (non-generic) atomic libcalls.

  For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
  provide atomic functions that pass parameters by value and return
  results directly.

  libgcc and libcompiler-rt only provide optimized libcalls for
  __atomic_fetch_*, as generic libcalls on non-integer types would make
  little sense. This means that we can finally make __atomic_fetch_*
  work
  on architectures for which we don't provide these operations as
  builtins
  (e.g. ARM).

  This should fix the dreaded "cannot compile this atomic library call
  yet" error that would pop up once every while.

This should make it possible for me to get C11 atomics working on all of
our platforms.
contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp