diff options
author | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2017-10-05 17:40:32 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2017-10-05 17:40:32 +0000 |
commit | 65f10246bbdd8e20ee5f55143c598a968010a6a5 (patch) | |
tree | a57d357e0946224412b462a1fdd054f055518e87 /llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | |
parent | 2d3f8f333d676e7d051680a1ca9254df185797af (diff) | |
download | bcm5719-llvm-65f10246bbdd8e20ee5f55143c598a968010a6a5.tar.gz bcm5719-llvm-65f10246bbdd8e20ee5f55143c598a968010a6a5.zip |
[mips] implement .set dspr2 directive
Implement .set dspr2 directive with appropriate feature bits. This
directive is a counterpart of -mattr=dspr2 command line option with the
exception that it does not influence elf header flags.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D38537
llvm-svn: 314994
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 9bbb430962e..6a411e0856b 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -6584,6 +6584,10 @@ bool MipsAsmParser::parseSetFeature(uint64_t Feature) { setFeatureBits(Mips::FeatureDSP, "dsp"); getTargetStreamer().emitDirectiveSetDsp(); break; + case Mips::FeatureDSPR2: + setFeatureBits(Mips::FeatureDSPR2, "dspr2"); + getTargetStreamer().emitDirectiveSetDspr2(); + break; case Mips::FeatureMicroMips: setFeatureBits(Mips::FeatureMicroMips, "micromips"); getTargetStreamer().emitDirectiveSetMicroMips(); @@ -6928,6 +6932,8 @@ bool MipsAsmParser::parseDirectiveSet() { return parseSetFeature(Mips::FeatureMips64r6); } else if (Tok.getString() == "dsp") { return parseSetFeature(Mips::FeatureDSP); + } else if (Tok.getString() == "dspr2") { + return parseSetFeature(Mips::FeatureDSPR2); } else if (Tok.getString() == "nodsp") { return parseSetNoDspDirective(); } else if (Tok.getString() == "msa") { |