diff options
author | ed <ed@FreeBSD.org> | 2013-06-15 09:42:43 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2013-06-15 09:42:43 +0000 |
commit | fd1bc7712a4ef21c74be5c30aa2e2c5df4ac2b2c (patch) | |
tree | 26c3b9858166a2edbd8d4985fce6ad59b9f25f44 /contrib/llvm/tools/clang/lib/Basic/Targets.cpp | |
parent | 48e709729463158dfd3ccd68d23ec12ef93586c0 (diff) | |
download | FreeBSD-src-fd1bc7712a4ef21c74be5c30aa2e2c5df4ac2b2c.zip FreeBSD-src-fd1bc7712a4ef21c74be5c30aa2e2c5df4ac2b2c.tar.gz |
Pull in r184040 from upstream clang trunk:
Emit native implementations of atomic operations on FreeBSD/armv6.
Just like on Linux, FreeBSD/armv6 assumes the system supports
ldrex/strex unconditionally. It is also used by the kernel. We can
therefore enable support for it, like we do on Linux.
While there, change one of the unit tests to explicitly test against
armv5 instead of armv7, as it actually tests whether libcalls are
emitted.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Basic/Targets.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Basic/Targets.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp index a622a11..fd7cdba 100644 --- a/contrib/llvm/tools/clang/lib/Basic/Targets.cpp +++ b/contrib/llvm/tools/clang/lib/Basic/Targets.cpp @@ -3533,8 +3533,8 @@ class ARMTargetInfo : public TargetInfo { // the kernel which on armv6 and newer uses ldrex and strex. The net result // is that if we assume the kernel is at least as recent as the hardware, // it is safe to use atomic instructions on armv6 and newer. - if (T.getOS() != llvm::Triple::Linux) - return false; + if (T.getOS() != llvm::Triple::Linux && T.getOS() != llvm::Triple::FreeBSD) + return false; StringRef ArchName = T.getArchName(); if (T.getArch() == llvm::Triple::arm) { if (!ArchName.startswith("armv")) |