diff options
| author | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-05-14 13:42:10 +0000 | 
|---|---|---|
| committer | Toma Tabacu <toma.tabacu@imgtec.com> | 2015-05-14 13:42:10 +0000 | 
| commit | 772155cbc6a2592fc9204b083263ded74b378645 (patch) | |
| tree | eaf793763822299a9ca66577547d3693ff117dae /llvm | |
| parent | 70b744e4a123a681004718465725967d2764cdc6 (diff) | |
| download | bcm5719-llvm-772155cbc6a2592fc9204b083263ded74b378645.tar.gz bcm5719-llvm-772155cbc6a2592fc9204b083263ded74b378645.zip  | |
[mips] [IAS] Emit .set macro/nomacro.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9563
llvm-svn: 237363
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/MC/Mips/mips_directives.s | 2 | ||||
| -rw-r--r-- | llvm/test/MC/Mips/module-directive-bad.s | 4 | 
3 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 45169b70513..c503083028a 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -3434,6 +3434,7 @@ bool MipsAsmParser::parseSetMacroDirective() {      return false;    }    AssemblerOptions.back()->setMacro(); +  getTargetStreamer().emitDirectiveSetMacro();    Parser.Lex(); // Consume the EndOfStatement.    return false;  } @@ -3451,6 +3452,7 @@ bool MipsAsmParser::parseSetNoMacroDirective() {      return false;    }    AssemblerOptions.back()->setNoMacro(); +  getTargetStreamer().emitDirectiveSetNoMacro();    Parser.Lex(); // Consume the EndOfStatement.    return false;  } diff --git a/llvm/test/MC/Mips/mips_directives.s b/llvm/test/MC/Mips/mips_directives.s index 1a7d61f3ad4..2ea37822f76 100644 --- a/llvm/test/MC/Mips/mips_directives.s +++ b/llvm/test/MC/Mips/mips_directives.s @@ -17,6 +17,7 @@ $BB0_2:  # CHECK-NOT: nop  # CHECK:   jal 1328             # encoding: [0x0c,0x00,0x01,0x4c]  # CHECK-NOT: nop +# CHECK: .set nomacro      .set    noreorder       b 1332 @@ -33,6 +34,7 @@ $JTI0_0:  # CHECK:     .4byte    2013265916      .set  at=$12      .set macro +# CHECK:   .set macro  # CHECK:   .set reorder  # CHECK:   b 1332               # encoding: [0x10,0x00,0x01,0x4d]  # CHECK:   nop                  # encoding: [0x00,0x00,0x00,0x00] diff --git a/llvm/test/MC/Mips/module-directive-bad.s b/llvm/test/MC/Mips/module-directive-bad.s index 963d651afe5..74dc6d22793 100644 --- a/llvm/test/MC/Mips/module-directive-bad.s +++ b/llvm/test/MC/Mips/module-directive-bad.s @@ -203,7 +203,7 @@      .set macro      .module fp=64 -# FIXME: emitDirectiveSetMacro should call forbidModuleDirective(). +# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code      .llvm_internal_mips_reallow_module_directive      .module fp=32 @@ -211,7 +211,7 @@      .set nomacro      .module fp=64 -# FIXME: emitDirectiveSetNoMacro should call forbidModuleDirective(). +# CHECK: :[[@LINE-1]]:13: error: .module directive must appear before any code      .llvm_internal_mips_reallow_module_directive      .module fp=32  | 

