diff options
author | Matheus Almeida <matheus.almeida@imgtec.com> | 2014-03-26 14:52:22 +0000 |
---|---|---|
committer | Matheus Almeida <matheus.almeida@imgtec.com> | 2014-03-26 14:52:22 +0000 |
commit | a2cd009c51680abc576fbb2ccf45f673409c1bf6 (patch) | |
tree | 50b89dafdd2e104ad38ee3da2c2e5157fb7633e4 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | |
parent | 3aa0e6a1f92a366a3213b6e8fb9665ec5739c1b3 (diff) | |
download | bcm5719-llvm-a2cd009c51680abc576fbb2ccf45f673409c1bf6.tar.gz bcm5719-llvm-a2cd009c51680abc576fbb2ccf45f673409c1bf6.zip |
[mips] Add support to '.set mips64r2'.
The '.set mips64r2' directive enables the feature Mips:FeatureMips64r2
from assembly. Note that it doesn't modify the ELF header as opposed
to the use of -mips64r2 from the command-line. The reason for this
is that we want to be as compatible as possible with existing assemblers
like GAS.
llvm-svn: 204815
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 47457509446..2244e3dec64 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/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::FeatureMips64r2: + setFeatureBits(Mips::FeatureMips64r2, "mips64r2"); + getTargetStreamer().emitDirectiveSetMips64R2(); + break; } return false; } @@ -2522,6 +2526,8 @@ bool MipsAsmParser::parseDirectiveSet() { return parseSetFeature(Mips::FeatureMicroMips); } else if (Tok.getString() == "mips32r2") { return parseSetFeature(Mips::FeatureMips32r2); + } else if (Tok.getString() == "mips64r2") { + return parseSetFeature(Mips::FeatureMips64r2); } else if (Tok.getString() == "dsp") { return parseSetFeature(Mips::FeatureDSP); } else { |