]> granicus.if.org Git - clang/commitdiff
[mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.
authorBrad Smith <brad@comstyle.com>
Fri, 29 Jun 2018 19:03:03 +0000 (19:03 +0000)
committerBrad Smith <brad@comstyle.com>
Fri, 29 Jun 2018 19:03:03 +0000 (19:03 +0000)
Reviewers: atanasyan

Differential Revision: https://reviews.llvm.org/D48515

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336004 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Gnu.cpp
test/Driver/freebsd.c
test/Driver/openbsd.c

index deaf51dc77e084e5013ea332fab730d7630e1ee4..2f632e2b5aa21432ca5338a27a213150f010ac9c 100644 (file)
@@ -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:
index 48f7c8e7f29c59f31eeecd4d051984a810d2fe4d..aac4d9d966ddc05fad2d2ec180e3c8a03dda97a4 100644 (file)
 // 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"
index 2bcd70377033436415ce69da2d5c6d0d606b166a..098ecc4a275ef5ba8decbf37b2fc4e424892cc6d 100644 (file)
 // 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