[llvm-commits] [llvm] r163364 - in /llvm/trunk: lib/Target/Mips/AsmParser/MipsAsmParser.cpp test/MC/Mips/mips_directives.s
Jack Carter
jcarter at mips.com
Thu Sep 6 17:48:02 PDT 2012
Author: jacksprat
Date: Thu Sep 6 19:48:02 2012
New Revision: 163364
URL: http://llvm.org/viewvc/llvm-project?rev=163364&view=rev
Log:
The Mips standalone assembler intial directive support.
Actually these are just stubs for parsing the directives.
Semantic support will come later.
Test cases included
Contributer: Vladimir Medic
Added:
llvm/trunk/test/MC/Mips/mips_directives.s
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=163364&r1=163363&r2=163364&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Thu Sep 6 19:48:02 2012
@@ -894,6 +894,49 @@
bool MipsAsmParser::
ParseDirective(AsmToken DirectiveID) {
+
+ if (DirectiveID.getString() == ".ent") {
+ //ignore this directive for now
+ Parser.Lex();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".end") {
+ //ignore this directive for now
+ Parser.Lex();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".frame") {
+ //ignore this directive for now
+ Parser.EatToEndOfStatement();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".set") {
+ //ignore this directive for now
+ Parser.EatToEndOfStatement();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".fmask") {
+ //ignore this directive for now
+ Parser.EatToEndOfStatement();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".mask") {
+ //ignore this directive for now
+ Parser.EatToEndOfStatement();
+ return false;
+ }
+
+ if (DirectiveID.getString() == ".gpword") {
+ //ignore this directive for now
+ Parser.EatToEndOfStatement();
+ return false;
+ }
+
return true;
}
Added: llvm/trunk/test/MC/Mips/mips_directives.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips_directives.s?rev=163364&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/mips_directives.s (added)
+++ llvm/trunk/test/MC/Mips/mips_directives.s Thu Sep 6 19:48:02 2012
@@ -0,0 +1,10 @@
+# RUN: llvm-mc -triple mips-unknown-unknown %s
+
+$BB0_2:
+ .frame $sp,0,$ra
+ .mask 0x00000000,0
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+$JTI0_0:
+ .gpword ($BB0_2)
More information about the llvm-commits
mailing list