mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 08:26:29 +00:00
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:
parent
0a824e63ab
commit
d4ab2f65df
@ -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;
|
||||
}
|
||||
|
||||
|
10
test/MC/Mips/mips_directives.s
Normal file
10
test/MC/Mips/mips_directives.s
Normal 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)
|
Loading…
Reference in New Issue
Block a user