From owner-svn-src-all@FreeBSD.ORG Sat Jun 15 09:42:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E9794EE1; Sat, 15 Jun 2013 09:42:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DAB651F79; Sat, 15 Jun 2013 09:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5F9gh1K014417; Sat, 15 Jun 2013 09:42:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5F9ghnc014415; Sat, 15 Jun 2013 09:42:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201306150942.r5F9ghnc014415@svn.freebsd.org> From: Ed Schouten Date: Sat, 15 Jun 2013 09:42:43 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2013 09:42:44 -0000 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"))