r236605 - [AArch64] Advertise that the __sync_*_compare_and_swap_1/2/4/8 builtins work
Reid Kleckner
reid at kleckner.net
Wed May 6 08:31:46 PDT 2015
Author: rnk
Date: Wed May 6 10:31:46 2015
New Revision: 236605
URL: http://llvm.org/viewvc/llvm-project?rev=236605&view=rev
Log:
[AArch64] Advertise that the __sync_*_compare_and_swap_1/2/4/8 builtins work
Fixes PR23428, where std::thread in libstdc++ would go haywire without
these defines.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=236605&r1=236604&r2=236605&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed May 6 10:31:46 2015
@@ -4926,6 +4926,12 @@ public:
if (Crypto)
Builder.defineMacro("__ARM_FEATURE_CRYPTO");
+
+ // All of the __sync_(bool|val)_compare_and_swap_(1|2|4|8) builtins work.
+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
}
void getTargetBuiltins(const Builtin::Info *&Records,
More information about the cfe-commits
mailing list