[llvm-branch-commits] [cfe-branch] r301086 - Merging r296430:
Brad Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Apr 22 10:15:16 PDT 2017
Author: brad
Date: Sat Apr 22 12:15:15 2017
New Revision: 301086
URL: http://llvm.org/viewvc/llvm-project?rev=301086&view=rev
Log:
Merging r296430:
------------------------------------------------------------------------
r296430 | brad | 2017-02-27 22:20:26 -0500 (Mon, 27 Feb 2017) | 2 lines
Set ABIs correctly for OpenBSD/arm; soft float and aapcs-linux.
------------------------------------------------------------------------
Modified:
cfe/branches/release_40/lib/Basic/Targets.cpp
cfe/branches/release_40/lib/Driver/Tools.cpp
cfe/branches/release_40/test/Driver/arm-abi.c
cfe/branches/release_40/test/Driver/openbsd.c
Modified: cfe/branches/release_40/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Basic/Targets.cpp?rev=301086&r1=301085&r2=301086&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_40/lib/Basic/Targets.cpp Sat Apr 22 12:15:15 2017
@@ -5146,6 +5146,8 @@ public:
default:
if (Triple.getOS() == llvm::Triple::NetBSD)
setABI("apcs-gnu");
+ else if (Triple.getOS() == llvm::Triple::OpenBSD)
+ setABI("aapcs-linux");
else
setABI("aapcs");
break;
Modified: cfe/branches/release_40/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Driver/Tools.cpp?rev=301086&r1=301085&r2=301086&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_40/lib/Driver/Tools.cpp Sat Apr 22 12:15:15 2017
@@ -962,6 +962,10 @@ arm::FloatABI arm::getARMFloatABI(const
}
break;
+ case llvm::Triple::OpenBSD:
+ ABI = FloatABI::Soft;
+ break;
+
default:
switch (Triple.getEnvironment()) {
case llvm::Triple::GNUEABIHF:
@@ -1251,6 +1255,8 @@ void Clang::AddARMTargetArgs(const llvm:
default:
if (Triple.getOS() == llvm::Triple::NetBSD)
ABIName = "apcs-gnu";
+ else if (Triple.getOS() == llvm::Triple::OpenBSD)
+ ABIName = "aapcs-linux";
else
ABIName = "aapcs";
break;
Modified: cfe/branches/release_40/test/Driver/arm-abi.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Driver/arm-abi.c?rev=301086&r1=301085&r2=301086&view=diff
==============================================================================
--- cfe/branches/release_40/test/Driver/arm-abi.c (original)
+++ cfe/branches/release_40/test/Driver/arm-abi.c Sat Apr 22 12:15:15 2017
@@ -28,6 +28,10 @@
// RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s
+// OpenBSD defaults to aapcs-linux
+// RUN: %clang -target arm--openbsd- %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s
+
// Otherwise, ABI is selected based on environment
// RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s
Modified: cfe/branches/release_40/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Driver/openbsd.c?rev=301086&r1=301085&r2=301086&view=diff
==============================================================================
--- cfe/branches/release_40/test/Driver/openbsd.c (original)
+++ cfe/branches/release_40/test/Driver/openbsd.c Sat Apr 22 12:15:15 2017
@@ -96,3 +96,8 @@
// CHECK-STATIC-PIE: "{{.*}}rcrt0.o"
// CHECK-STATIC-PIE-NOT: "-nopie"
// CHECK-NOPIE: "-nopie" "{{.*}}crt0.o"
+
+// Check ARM float ABI
+// RUN: %clang -target arm-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-ARM-FLOAT-ABI %s
+// CHECK-ARM-FLOAT-ABI: "-mfloat-abi" "soft"
More information about the llvm-branch-commits
mailing list