]> granicus.if.org Git - clang/commitdiff
[Mips] Set mips32 as default CPU for MIPS32 Android
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Tue, 17 May 2016 10:46:10 +0000 (10:46 +0000)
committerPetar Jovanovic <petar.jovanovic@imgtec.com>
Tue, 17 May 2016 10:46:10 +0000 (10:46 +0000)
Change default CPU for MIPS32 Android. Now it is mips32 (rev1).

Differential Revision: http://reviews.llvm.org/D20313

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

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

index b6d86e4ea8e74ab2be8eff73791783b0d8a77bc6..206c32ede5260626584f2851da11ee60a87f5691 100644 (file)
@@ -1183,8 +1183,10 @@ void mips::getMipsCPUAndABI(const ArgList &Args, const llvm::Triple &Triple,
   }
 
   // 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)
index 422aa139346d908c06056535fbbc8be2641a2ca2..fe1ec48476102c98903c6b21103a09a47db28ed6 100644 (file)
 // 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 | \