summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@imgtec.com>2017-10-05 17:40:32 +0000
committerPetar Jovanovic <petar.jovanovic@imgtec.com>2017-10-05 17:40:32 +0000
commit65f10246bbdd8e20ee5f55143c598a968010a6a5 (patch)
treea57d357e0946224412b462a1fdd054f055518e87 /llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
parent2d3f8f333d676e7d051680a1ca9254df185797af (diff)
downloadbcm5719-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/MCTargetDesc/MipsTargetStreamer.cpp')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
index 2907b771585..f01a800afc5 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -98,6 +98,7 @@ void MipsTargetStreamer::emitDirectiveSetHardFloat() {
forbidModuleDirective();
}
void MipsTargetStreamer::emitDirectiveSetDsp() { forbidModuleDirective(); }
+void MipsTargetStreamer::emitDirectiveSetDspr2() { forbidModuleDirective(); }
void MipsTargetStreamer::emitDirectiveSetNoDsp() { forbidModuleDirective(); }
void MipsTargetStreamer::emitDirectiveCpLoad(unsigned RegNo) {}
bool MipsTargetStreamer::emitDirectiveCpRestore(
@@ -547,6 +548,11 @@ void MipsTargetAsmStreamer::emitDirectiveSetDsp() {
MipsTargetStreamer::emitDirectiveSetDsp();
}
+void MipsTargetAsmStreamer::emitDirectiveSetDspr2() {
+ OS << "\t.set\tdspr2\n";
+ MipsTargetStreamer::emitDirectiveSetDspr2();
+}
+
void MipsTargetAsmStreamer::emitDirectiveSetNoDsp() {
OS << "\t.set\tnodsp\n";
MipsTargetStreamer::emitDirectiveSetNoDsp();
OpenPOWER on IntegriCloud