[PATCH] D20313: [Mips] Set mips32 as default CPU for MIPS32 Android

Petar Jovanovic via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 17:03:14 PDT 2016


petarj created this revision.
petarj added a reviewer: atanasyan.
petarj added a subscriber: cfe-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

Change default CPU for MIPS32 Android. Now it is mips32 (rev1).

http://reviews.llvm.org/D20313

Files:
  lib/Driver/Tools.cpp
  test/Driver/clang-translation.c

Index: test/Driver/clang-translation.c
===================================================================
--- test/Driver/clang-translation.c
+++ test/Driver/clang-translation.c
@@ -245,7 +245,7 @@
 // RUN: FileCheck -check-prefix=MIPSEL-ANDROID %s
 // MIPSEL-ANDROID: clang
 // MIPSEL-ANDROID: "-cc1"
-// MIPSEL-ANDROID: "-target-cpu" "mips32r2"
+// MIPSEL-ANDROID: "-target-cpu" "mips32"
 // MIPSEL-ANDROID: "-mfloat-abi" "hard"
 
 // RUN: %clang -target mips64-linux-gnu -### -S %s 2>&1 | \
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -1183,8 +1183,10 @@
   }
 
   // MIPS64r6 is the default for Android MIPS64 (mips64el-linux-android).
-  if (Triple.isAndroid())
+  if (Triple.isAndroid()) {
+    DefMips32CPU = "mips32";
     DefMips64CPU = "mips64r6";
+  }
 
   // MIPS3 is the default for mips64*-unknown-openbsd.
   if (Triple.getOS() == llvm::Triple::OpenBSD)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20313.57423.patch
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160517/ec8d96fc/attachment.bin>


More information about the cfe-commits mailing list