r351245 - Enable IAS for OpenBSD SPARC.

Brad Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 15 13:04:36 PST 2019


Author: brad
Date: Tue Jan 15 13:04:36 2019
New Revision: 351245

URL: http://llvm.org/viewvc/llvm-project?rev=351245&view=rev
Log:
Enable IAS for OpenBSD SPARC.

Modified:
    cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
    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=351245&r1=351244&r2=351245&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Tue Jan 15 13:04:36 2019
@@ -2512,7 +2512,7 @@ bool Generic_GCC::IsIntegratedAssemblerD
   case llvm::Triple::sparc:
   case llvm::Triple::sparcel:
   case llvm::Triple::sparcv9:
-    if (getTriple().isOSSolaris())
+    if (getTriple().isOSSolaris() || getTriple().isOSOpenBSD())
       return true;
     return false;
   default:

Modified: cfe/trunk/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/openbsd.c?rev=351245&r1=351244&r2=351245&view=diff
==============================================================================
--- cfe/trunk/test/Driver/openbsd.c (original)
+++ cfe/trunk/test/Driver/openbsd.c Tue Jan 15 13:04:36 2019
@@ -74,12 +74,16 @@
 // CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL"
 // CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC"
 
-// Check that the integrated assembler is enabled for MIPS64
+// Check that the integrated assembler is enabled for MIPS64/SPARC
 // RUN: %clang -target mips64-unknown-openbsd -### -c %s 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-MIPS64-AS %s
+// RUN:   | FileCheck -check-prefix=CHECK-IAS %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"
+// RUN:   | FileCheck -check-prefix=CHECK-IAS %s
+// RUN: %clang -target sparc-unknown-openbsd -### -c %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-IAS %s
+// RUN: %clang -target sparc64-unknown-openbsd -### -c %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK-IAS %s
+// CHECK-IAS-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 \




More information about the cfe-commits mailing list