summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2013-11-19 12:22:38 +0000
committerSimon Atanasyan <simon@atanasyan.com>2013-11-19 12:22:38 +0000
commit22a6f4d4569f9332d846bfa1fddcec8a35e2263d (patch)
treeb0be4045ea8ef925d960fbb808fb9c2d1651859e /clang/lib/Driver/Tools.cpp
parent1093afe27a3e34a51b3042142b478b30301bd32e (diff)
downloadbcm5719-llvm-22a6f4d4569f9332d846bfa1fddcec8a35e2263d.tar.gz
bcm5719-llvm-22a6f4d4569f9332d846bfa1fddcec8a35e2263d.zip
[Mips] Do not adjust float-abi flags in case of MIPS16 mode. This code
should be isolated in the backend (r195123). From the frontend point of view in case of "-mhard-float -mips16" combination of flags the float ABI mode should remain unchanged. The patch reviewed by Reed Kotler. llvm-svn: 195124
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index ad03e2ec11c..ac1fe5cee2c 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1015,8 +1015,7 @@ static void AddTargetFeature(const ArgList &Args,
static void getMIPSTargetFeatures(const Driver &D, const ArgList &Args,
std::vector<const char *> &Features) {
StringRef FloatABI = getMipsFloatABI(D, Args);
- bool IsMips16 = Args.getLastArg(options::OPT_mips16) != NULL;
- if (FloatABI == "soft" || (FloatABI == "hard" && IsMips16)) {
+ if (FloatABI == "soft") {
// FIXME: Note, this is a hack. We need to pass the selected float
// mode to the MipsTargetInfoBase to define appropriate macros there.
// Now it is the only method.
@@ -1057,18 +1056,11 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args,
StringRef FloatABI = getMipsFloatABI(D, Args);
- bool IsMips16 = Args.getLastArg(options::OPT_mips16) != NULL;
-
- if (FloatABI == "soft" || (FloatABI == "hard" && IsMips16)) {
+ if (FloatABI == "soft") {
// Floating point operations and argument passing are soft.
CmdArgs.push_back("-msoft-float");
CmdArgs.push_back("-mfloat-abi");
CmdArgs.push_back("soft");
-
- if (FloatABI == "hard" && IsMips16) {
- CmdArgs.push_back("-mllvm");
- CmdArgs.push_back("-mips16-hard-float");
- }
}
else {
// Floating point operations and argument passing are hard.
OpenPOWER on IntegriCloud