From 3317d0fa0bd1f5c5adc14bcc6adc2a38acc9064b Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 27 May 2016 14:30:23 +0000 Subject: [PATCH] [mips] Kill 'support' for untested EABI. Summary: There are no llvm backend tests* for EABI and no EABI buildbots. There were only three clang tests, all of which checked that -mabi=eabi was passed to the assembler. *There is a single backend test that specifies EABI but it actually tests MIPS16. Reviewers: atanasyan Subscribers: emaste, sdardis, atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270998 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 10 ++++------ lib/Driver/Tools.cpp | 2 +- test/Driver/freebsd-mips-as.c | 5 ----- test/Driver/mips-abi.c | 6 ------ test/Driver/mips-as.c | 5 ----- 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 8f1b045297..45971fdc40 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -7009,7 +7009,7 @@ public: class MipsTargetInfo : public TargetInfo { void setDataLayout() { if (BigEndian) { - if (ABI == "o32" || ABI == "eabi") + if (ABI == "o32") resetDataLayout("E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"); else if (ABI == "n32") resetDataLayout("E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"); @@ -7018,7 +7018,7 @@ class MipsTargetInfo : public TargetInfo { else llvm_unreachable("Invalid ABI"); } else { - if (ABI == "o32" || ABI == "eabi") + if (ABI == "o32") resetDataLayout("e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"); else if (ABI == "n32") resetDataLayout("e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"); @@ -7100,7 +7100,7 @@ public: bool setABI(const std::string &Name) override { if (getTriple().getArch() == llvm::Triple::mips || getTriple().getArch() == llvm::Triple::mipsel) { - if (Name == "o32" || Name == "eabi") { + if (Name == "o32") { ABI = Name; return true; } @@ -7217,9 +7217,7 @@ public: Builder.defineMacro("__mips_o32"); Builder.defineMacro("_ABIO32", "1"); Builder.defineMacro("_MIPS_SIM", "_ABIO32"); - } else if (ABI == "eabi") - Builder.defineMacro("__mips_eabi"); - else if (ABI == "n32") { + } else if (ABI == "n32") { Builder.defineMacro("__mips_n32"); Builder.defineMacro("_ABIN32", "2"); Builder.defineMacro("_MIPS_SIM", "_ABIN32"); diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 39f78c3066..33de18d710 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1233,7 +1233,7 @@ void mips::getMipsCPUAndABI(const ArgList &Args, const llvm::Triple &Triple, if (CPUName.empty()) { // Deduce CPU name from ABI name. CPUName = llvm::StringSwitch(ABIName) - .Cases("o32", "eabi", DefMips32CPU) + .Case("o32", DefMips32CPU) .Cases("n32", "n64", DefMips64CPU) .Default(""); } diff --git a/test/Driver/freebsd-mips-as.c b/test/Driver/freebsd-mips-as.c index 7555888e06..af02c38693 100644 --- a/test/Driver/freebsd-mips-as.c +++ b/test/Driver/freebsd-mips-as.c @@ -45,11 +45,6 @@ // RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s // MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL" // -// RUN: %clang -target mips-unknown-freebsd -mabi=eabi -### \ -// RUN: -no-integrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=MIPS-EABI %s -// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-EB" -// // RUN: %clang -target mips64-unknown-freebsd -mabi=n32 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-N32 %s diff --git a/test/Driver/mips-abi.c b/test/Driver/mips-abi.c index cede6850a0..8391e94589 100644 --- a/test/Driver/mips-abi.c +++ b/test/Driver/mips-abi.c @@ -45,12 +45,6 @@ // RUN: | FileCheck -check-prefix=MIPS-ABI-O64 %s // MIPS-ABI-O64: error: unknown target ABI 'o64' // -// RUN: %clang -target mips-linux-gnu -### -c %s \ -// RUN: -mabi=eabi 2>&1 \ -// RUN: | FileCheck -check-prefix=MIPS-ABI-EABI %s -// MIPS-ABI-EABI: "-target-cpu" "mips32r2" -// MIPS-ABI-EABI: "-target-abi" "eabi" -// // RUN: not %clang -target mips-linux-gnu -c %s \ // RUN: -mabi=unknown 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-ABI-UNKNOWN %s diff --git a/test/Driver/mips-as.c b/test/Driver/mips-as.c index 63fc64c3f7..4d956208f0 100644 --- a/test/Driver/mips-as.c +++ b/test/Driver/mips-as.c @@ -30,11 +30,6 @@ // RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s // MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL" // -// RUN: %clang -target mips-linux-gnu -mabi=eabi -### \ -// RUN: -no-integrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix=MIPS-EABI %s -// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-mno-shared" "-call_nonpic" "-EB" -// // RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \ // RUN: -no-integrated-as -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-N32 %s -- 2.40.0