summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-09-17 21:21:57 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-09-17 21:21:57 +0000
commit9265dca8b51148f1a7849b454005d65cbbced5e9 (patch)
treecdffb5b5f1d814b8726b51f5a84c398c71c6cb20 /llvm/lib/Support/Triple.cpp
parentbdf0381e216e2aaa1aa736fd288d94786e4447e0 (diff)
downloadbcm5719-llvm-9265dca8b51148f1a7849b454005d65cbbced5e9.tar.gz
bcm5719-llvm-9265dca8b51148f1a7849b454005d65cbbced5e9.zip
[mips] Fix MIPS N32 ABI triples support
Add support mips64(el)-linux-gnuabin32 triples, and set them to N32. Debian architecture name mipsn32/mipsn32el are also added. Set UseIntegratedAssembler for N32 if we can detect it. Patch by YunQiang Su. Differential revision: https://reviews.llvm.org/D51408 llvm-svn: 342416
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index d1017fb2a28..b56d1d9eff2 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -401,8 +401,8 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Case("msp430", Triple::msp430)
.Cases("mips", "mipseb", "mipsallegrex", Triple::mips)
.Cases("mipsel", "mipsallegrexel", Triple::mipsel)
- .Cases("mips64", "mips64eb", Triple::mips64)
- .Case("mips64el", Triple::mips64el)
+ .Cases("mips64", "mips64eb", "mipsn32", Triple::mips64)
+ .Cases("mips64el", "mipsn32el", Triple::mips64el)
.Case("nios2", Triple::nios2)
.Case("r600", Triple::r600)
.Case("amdgcn", Triple::amdgcn)
@@ -711,6 +711,14 @@ Triple::Triple(const Twine &Str)
ObjectFormat = parseFormat(Components[3]);
}
}
+ } else {
+ Environment = StringSwitch<Triple::EnvironmentType>(Components[0])
+ .StartsWith("mipsn32", Triple::GNUABIN32)
+ .StartsWith("mips64", Triple::GNUABI64)
+ .StartsWith("mipsisa64", Triple::GNUABI64)
+ .StartsWith("mipsisa32", Triple::GNU)
+ .Cases("mips", "mipsel", Triple::GNU)
+ .Default(UnknownEnvironment);
}
}
if (ObjectFormat == UnknownObjectFormat)
OpenPOWER on IntegriCloud