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
llvm-svn: 163364
This commit is contained in:
Jack Carter 2012-09-07 00:48:02 +00:00
parent 0a824e63ab
commit d4ab2f65df
2 changed files with 53 additions and 0 deletions

View File

@ -894,6 +894,49 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
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;
}

View File

@ -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)