Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2013 09:42:43 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251785 - head/contrib/llvm/tools/clang/lib/Basic
Message-ID:  <201306150942.r5F9ghnc014415@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sat Jun 15 09:42:43 2013
New Revision: 251785
URL: http://svnweb.freebsd.org/changeset/base/251785

Log:
  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.

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp	Sat Jun 15 09:04:10 2013	(r251784)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp	Sat Jun 15 09:42:43 2013	(r251785)
@@ -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"))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306150942.r5F9ghnc014415>