[PATCH] Enable atomics on Bitrig+arm

Patrick Wildt mail at patrick-wildt.de
Sun Jun 16 13:05:25 PDT 2013


Hi,

as of r184040, atomics on ARM were enabled for FreeBSD.  Bitrig also suffers
the issue, therefore I've attached a patch which enables those for Bitrig.

I'd like to ask you to commit it.

Thanks in advance,
Patrick Wildt

--- lib/Basic/Targets.cpp.orig	Sun Jun 16 21:08:39 2013
+++ lib/Basic/Targets.cpp	Sun Jun 16 21:20:01 2013
@@ -3534,7 +3534,9 @@ 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 && T.getOS() != llvm::Triple::FreeBSD)
+    if (T.getOS() != llvm::Triple::Linux &&
+        T.getOS() != llvm::Triple::FreeBSD &&
+        T.getOS() != llvm::Triple::Bitrig)
       return false;
     StringRef ArchName = T.getArchName();
     if (T.getArch() == llvm::Triple::arm) {




More information about the cfe-commits mailing list