From f76b90d2c3740192a2fc7b3a466564fdfac1225b Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Fri, 17 Jul 2015 12:57:30 +0000 Subject: [PATCH] [Mips] Set mips64r6 as default CPU for MIPS64 Android 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 | 4 ++++ test/Driver/clang-translation.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 38ed12bc70..d4a307b62a 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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) diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c index 9db23a074d..422aa13934 100644 --- a/test/Driver/clang-translation.c +++ b/test/Driver/clang-translation.c @@ -266,5 +266,5 @@ // 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" -- 2.40.0