[PATCH] [mips] [IAS] Emit .set macro/nomacro.
Toma Tabacu
toma.tabacu at imgtec.com
Thu May 7 07:58:00 PDT 2015
Hi dsanders,
http://reviews.llvm.org/D9563
Files:
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/mips_directives.s
test/MC/Mips/module-directive-bad.s
Index: lib/Target/Mips/AsmParser/MipsAsmParser.cpp
===================================================================
--- lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -3442,6 +3442,7 @@
return false;
}
AssemblerOptions.back()->setMacro();
+ getTargetStreamer().emitDirectiveSetMacro();
Parser.Lex(); // Consume the EndOfStatement.
return false;
}
@@ -3459,6 +3460,7 @@
return false;
}
AssemblerOptions.back()->setNoMacro();
+ getTargetStreamer().emitDirectiveSetNoMacro();
Parser.Lex(); // Consume the EndOfStatement.
return false;
}
Index: test/MC/Mips/mips_directives.s
===================================================================
--- test/MC/Mips/mips_directives.s
+++ test/MC/Mips/mips_directives.s
@@ -17,6 +17,7 @@
# 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 @@
# 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]
Index: test/MC/Mips/module-directive-bad.s
===================================================================
--- test/MC/Mips/module-directive-bad.s
+++ test/MC/Mips/module-directive-bad.s
@@ -203,15 +203,15 @@
.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
# CHECK-NOT: :[[@LINE-1]]:13: error: .module directive must appear before any code
.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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9563.25186.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/4145db7a/attachment.bin>
More information about the llvm-commits
mailing list