]> granicus.if.org Git - clang/commitdiff
[Mips] Set mips64r6 as default CPU for MIPS64 Android
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Fri, 17 Jul 2015 12:57:30 +0000 (12:57 +0000)
committerPetar Jovanovic <petar.jovanovic@imgtec.com>
Fri, 17 Jul 2015 12:57:30 +0000 (12:57 +0000)
Change default CPU for MIPS64 Android. Now it is mips64r6.

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

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

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

index 38ed12bc7020f03f8e6b6c969beca23650b0dab9..d4a307b62a414fc5877e81792c4795a49dd55a0e 100644 (file)
@@ -941,6 +941,10 @@ void mips::getMipsCPUAndABI(const ArgList &Args, const llvm::Triple &Triple,
     DefMips32CPU = "mips32r6";
     DefMips64CPU = "mips64r6";
   }
+  // MIPS64r6 is the default for Android MIPS64 (mips64el-linux-android).
+  if (Triple.getEnvironment() == llvm::Triple::Android)
+    DefMips64CPU = "mips64r6";
 
   // MIPS3 is the default for mips64*-unknown-openbsd.
   if (Triple.getOS() == llvm::Triple::OpenBSD)
index 9db23a074d8532d3d21694e94fdd56da366f58c5..422aa139346d908c06056535fbbc8be2641a2ca2 100644 (file)
 // RUN: FileCheck -check-prefix=MIPS64EL-ANDROID %s
 // MIPS64EL-ANDROID: clang
 // MIPS64EL-ANDROID: "-cc1"
-// MIPS64EL-ANDROID: "-target-cpu" "mips64r2"
+// MIPS64EL-ANDROID: "-target-cpu" "mips64r6"
 // MIPS64EL-ANDROID: "-mfloat-abi" "hard"