[PATCH] D94442: clang: Always pass PowerPC endian information to GNU as

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 14:51:09 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0a23fbd28c75: clang: Always pass PowerPC endian information to GNU as (authored by nathanchance, committed by nickdesaulniers).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94442/new/

https://reviews.llvm.org/D94442

Files:
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/ppc-features.cpp


Index: clang/test/Driver/ppc-features.cpp
===================================================================
--- clang/test/Driver/ppc-features.cpp
+++ clang/test/Driver/ppc-features.cpp
@@ -156,14 +156,25 @@
 // CHECK-NOSPE: "-target-feature" "-spe"
 
 // Assembler features
-// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_BE_AS_ARGS %s
-// CHECK_BE_AS_ARGS: "-mppc64"
-// CHECK_BE_AS_ARGS: "-many"
-
-// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_LE_AS_ARGS %s
-// CHECK_LE_AS_ARGS: "-mppc64"
-// CHECK_LE_AS_ARGS: "-mlittle-endian"
-// CHECK_LE_AS_ARGS: "-mpower8"
+// RUN: %clang -target powerpc-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_32_BE_AS_ARGS %s
+// CHECK_32_BE_AS_ARGS: "-mppc"
+// CHECK_32_BE_AS_ARGS-SAME: "-mbig-endian"
+// CHECK_32_BE_AS_ARGS-SAME: "-many"
+
+// RUN: %clang -target powerpcle-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_32_LE_AS_ARGS %s
+// CHECK_32_LE_AS_ARGS: "-mppc"
+// CHECK_32_LE_AS_ARGS-SAME: "-mlittle-endian"
+// CHECK_32_LE_AS_ARGS-SAME: "-many"
+
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_64_BE_AS_ARGS %s
+// CHECK_64_BE_AS_ARGS: "-mppc64"
+// CHECK_64_BE_AS_ARGS-SAME: "-mbig-endian"
+// CHECK_64_BE_AS_ARGS-SAME: "-many"
+
+// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_64_LE_AS_ARGS %s
+// CHECK_64_LE_AS_ARGS: "-mppc64"
+// CHECK_64_LE_AS_ARGS-SAME: "-mlittle-endian"
+// CHECK_64_LE_AS_ARGS-SAME: "-mpower8"
 
 // OpenMP features
 // RUN: %clang -target powerpc-unknown-linux-gnu %s -### -fopenmp=libomp -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_OPENMP_TLS %s
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -731,6 +731,7 @@
   case llvm::Triple::ppc: {
     CmdArgs.push_back("-a32");
     CmdArgs.push_back("-mppc");
+    CmdArgs.push_back("-mbig-endian");
     CmdArgs.push_back(
       ppc::getPPCAsmModeForCPU(getCPUName(Args, getToolChain().getTriple())));
     break;
@@ -746,6 +747,7 @@
   case llvm::Triple::ppc64: {
     CmdArgs.push_back("-a64");
     CmdArgs.push_back("-mppc64");
+    CmdArgs.push_back("-mbig-endian");
     CmdArgs.push_back(
       ppc::getPPCAsmModeForCPU(getCPUName(Args, getToolChain().getTriple())));
     break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94442.315944.patch
Type: text/x-patch
Size: 2655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210111/2380388b/attachment-0001.bin>


More information about the cfe-commits mailing list