summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/AsmParser
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2014-03-26 15:14:32 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2014-03-26 15:14:32 +0000
commit5957d10b41ae7f66f4f4882527a42cef7a85b395 (patch)
tree99e80a3950ab6ade0bfd42c49e7aff70231ff6f8 /lib/Target/Mips/AsmParser
parenta634d0a57046c4045c746021553d11fc0caeecb4 (diff)
downloadllvm-5957d10b41ae7f66f4f4882527a42cef7a85b395.tar.gz
llvm-5957d10b41ae7f66f4f4882527a42cef7a85b395.tar.bz2
llvm-5957d10b41ae7f66f4f4882527a42cef7a85b395.tar.xz
[mips] Add support to '.set mips64'.
The '.set mips64' directive enables the feature Mips:FeatureMips64 from assembly. Note that it doesn't modify the ELF header as opposed to the use of -mips64 from the command-line. The reason for this is that we want to be as compatible as possible with existing assemblers like GAS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/AsmParser')
-rw-r--r--lib/Target/Mips/AsmParser/MipsAsmParser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 2244e3dec6..35c1f4bf4f 100644
--- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -2489,6 +2489,10 @@ bool MipsAsmParser::parseSetFeature(uint64_t Feature) {
setFeatureBits(Mips::FeatureMips32r2, "mips32r2");
getTargetStreamer().emitDirectiveSetMips32R2();
break;
+ case Mips::FeatureMips64:
+ setFeatureBits(Mips::FeatureMips64, "mips64");
+ getTargetStreamer().emitDirectiveSetMips64();
+ break;
case Mips::FeatureMips64r2:
setFeatureBits(Mips::FeatureMips64r2, "mips64r2");
getTargetStreamer().emitDirectiveSetMips64R2();
@@ -2526,6 +2530,8 @@ bool MipsAsmParser::parseDirectiveSet() {
return parseSetFeature(Mips::FeatureMicroMips);
} else if (Tok.getString() == "mips32r2") {
return parseSetFeature(Mips::FeatureMips32r2);
+ } else if (Tok.getString() == "mips64") {
+ return parseSetFeature(Mips::FeatureMips64);
} else if (Tok.getString() == "mips64r2") {
return parseSetFeature(Mips::FeatureMips64r2);
} else if (Tok.getString() == "dsp") {