summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2018-06-29 19:03:03 +0000
committerBrad Smith <brad@comstyle.com>2018-06-29 19:03:03 +0000
commit3d0e91afdc40c5934822bd84158f62261acd506a (patch)
tree6b384b16b1a70b3071c44c886e2547ec906d64f9
parent38049a51bda3a7f453507c2cb42734b74ee7e6ae (diff)
downloadbcm5719-llvm-3d0e91afdc40c5934822bd84158f62261acd506a.tar.gz
bcm5719-llvm-3d0e91afdc40c5934822bd84158f62261acd506a.zip
[mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.
Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D48515 llvm-svn: 336004
-rw-r--r--clang/lib/Driver/ToolChains/Gnu.cpp10
-rw-r--r--clang/test/Driver/freebsd.c7
-rw-r--r--clang/test/Driver/openbsd.c7
3 files changed, 20 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index deaf51dc77e..2f632e2b5aa 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2412,11 +2412,13 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const {
return true;
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
- // Enabled for Debian and Android mips64/mipsel, as they can precisely
- // identify the ABI in use (Debian) or only use N64 for MIPS64 (Android).
- // Other targets are unable to distinguish N32 from N64.
+ // Enabled for Debian, Android, FreeBSD and OpenBSD mips64/mipsel, as they
+ // can precisely identify the ABI in use (Debian) or only use N64 for MIPS64
+ // (Android). Other targets are unable to distinguish N32 from N64.
if (getTriple().getEnvironment() == llvm::Triple::GNUABI64 ||
- getTriple().isAndroid())
+ getTriple().isAndroid() ||
+ getTriple().isOSFreeBSD() ||
+ getTriple().isOSOpenBSD())
return true;
return false;
default:
diff --git a/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c
index 48f7c8e7f29..aac4d9d966d 100644
--- a/clang/test/Driver/freebsd.c
+++ b/clang/test/Driver/freebsd.c
@@ -183,3 +183,10 @@
// RUN: %clang -target mips64el-unknown-freebsd -### -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-MIPS64-CPU %s
// CHECK-MIPS64-CPU: "-target-cpu" "mips3"
+
+// Check that the integrated assembler is enabled for MIPS64
+// RUN: %clang -target mips64-unknown-freebsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s
+// RUN: %clang -target mips64el-unknown-freebsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s
+// CHECK-MIPS64-AS-NOT: "-no-integrated-as"
diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c
index 2bcd7037703..098ecc4a275 100644
--- a/clang/test/Driver/openbsd.c
+++ b/clang/test/Driver/openbsd.c
@@ -74,6 +74,13 @@
// CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL"
// CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC"
+// Check that the integrated assembler is enabled for MIPS64
+// RUN: %clang -target mips64-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s
+// RUN: %clang -target mips64el-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-MIPS64-AS %s
+// CHECK-MIPS64-AS-NOT: "-no-integrated-as"
+
// Check linking against correct startup code when (not) using PIE
// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-PIE %s
OpenPOWER on IntegriCloud