r336004 - [mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 29 12:03:03 PDT 2018
Author: brad
Date: Fri Jun 29 12:03:03 2018
New Revision: 336004
URL: http://llvm.org/viewvc/llvm-project?rev=336004&view=rev
Log:
[mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D48515
Modified:
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
cfe/trunk/test/Driver/freebsd.c
cfe/trunk/test/Driver/openbsd.c
Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=336004&r1=336003&r2=336004&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Fri Jun 29 12:03:03 2018
@@ -2412,11 +2412,13 @@ bool Generic_GCC::IsIntegratedAssemblerD
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:
Modified: cfe/trunk/test/Driver/freebsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/freebsd.c?rev=336004&r1=336003&r2=336004&view=diff
==============================================================================
--- cfe/trunk/test/Driver/freebsd.c (original)
+++ cfe/trunk/test/Driver/freebsd.c Fri Jun 29 12:03:03 2018
@@ -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"
Modified: cfe/trunk/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/openbsd.c?rev=336004&r1=336003&r2=336004&view=diff
==============================================================================
--- cfe/trunk/test/Driver/openbsd.c (original)
+++ cfe/trunk/test/Driver/openbsd.c Fri Jun 29 12:03:03 2018
@@ -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
More information about the cfe-commits
mailing list