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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jack Carter 2012-09-07 00:48:02 +00:00
parent f740d6e328
commit acbea45573
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)