mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Minor changes based on post commit review:
Contributer: Vladimir Medic llvm-svn: 165346
This commit is contained in:
parent
f6e36e5c52
commit
62dbd17b39
@ -61,7 +61,7 @@ class MipsAsmParser : public MCTargetAsmParser {
|
|||||||
|
|
||||||
MCSubtargetInfo &STI;
|
MCSubtargetInfo &STI;
|
||||||
MCAsmParser &Parser;
|
MCAsmParser &Parser;
|
||||||
MipsAssemblerOptions *Options;
|
MipsAssemblerOptions Options;
|
||||||
|
|
||||||
|
|
||||||
#define GET_ASSEMBLER_HEADER
|
#define GET_ASSEMBLER_HEADER
|
||||||
@ -146,7 +146,6 @@ public:
|
|||||||
: MCTargetAsmParser(), STI(sti), Parser(parser) {
|
: MCTargetAsmParser(), STI(sti), Parser(parser) {
|
||||||
// Initialize the set of available features.
|
// Initialize the set of available features.
|
||||||
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
|
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
|
||||||
Options = new MipsAssemblerOptions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MCAsmParser &getParser() const { return Parser; }
|
MCAsmParser &getParser() const { return Parser; }
|
||||||
@ -521,11 +520,11 @@ bool MipsAssemblerOptions::setATReg(unsigned Reg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned MipsAsmParser::getATReg() {
|
unsigned MipsAsmParser::getATReg() {
|
||||||
unsigned Reg = Options->getATRegNum();
|
unsigned Reg = Options.getATRegNum();
|
||||||
if (isMips64())
|
if (isMips64())
|
||||||
return getReg(Mips::CPU64RegsRegClassID,Reg);
|
return getReg(Mips::CPU64RegsRegClassID,Reg);
|
||||||
else
|
|
||||||
return getReg(Mips::CPURegsRegClassID,Reg);
|
return getReg(Mips::CPURegsRegClassID,Reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned MipsAsmParser::getReg(int RC,int RegNo) {
|
unsigned MipsAsmParser::getReg(int RC,int RegNo) {
|
||||||
@ -1020,7 +1019,7 @@ bool MipsAsmParser::parseSetNoAtDirective() {
|
|||||||
// line should look like:
|
// line should look like:
|
||||||
// .set noat
|
// .set noat
|
||||||
// set at reg to 0
|
// set at reg to 0
|
||||||
Options->setATReg(0);
|
Options.setATReg(0);
|
||||||
// eat noat
|
// eat noat
|
||||||
Parser.Lex();
|
Parser.Lex();
|
||||||
// if this is not the end of the statement, report error
|
// if this is not the end of the statement, report error
|
||||||
@ -1037,7 +1036,7 @@ bool MipsAsmParser::parseSetAtDirective() {
|
|||||||
// or .set at=$reg
|
// or .set at=$reg
|
||||||
getParser().Lex();
|
getParser().Lex();
|
||||||
if (getLexer().is(AsmToken::EndOfStatement)) {
|
if (getLexer().is(AsmToken::EndOfStatement)) {
|
||||||
Options->setATReg(1);
|
Options.setATReg(1);
|
||||||
Parser.Lex(); // Consume the EndOfStatement
|
Parser.Lex(); // Consume the EndOfStatement
|
||||||
return false;
|
return false;
|
||||||
} else if (getLexer().is(AsmToken::Equal)) {
|
} else if (getLexer().is(AsmToken::Equal)) {
|
||||||
@ -1052,7 +1051,7 @@ bool MipsAsmParser::parseSetAtDirective() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const AsmToken &Reg = Parser.getTok();
|
const AsmToken &Reg = Parser.getTok();
|
||||||
if (!Options->setATReg(Reg.getIntVal())) {
|
if (!Options.setATReg(Reg.getIntVal())) {
|
||||||
reportParseError("unexpected token in statement");
|
reportParseError("unexpected token in statement");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1077,7 +1076,7 @@ bool MipsAsmParser::parseSetReorderDirective() {
|
|||||||
reportParseError("unexpected token in statement");
|
reportParseError("unexpected token in statement");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Options->setReorder();
|
Options.setReorder();
|
||||||
Parser.Lex(); // Consume the EndOfStatement
|
Parser.Lex(); // Consume the EndOfStatement
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1089,7 +1088,7 @@ bool MipsAsmParser::parseSetNoReorderDirective() {
|
|||||||
reportParseError("unexpected token in statement");
|
reportParseError("unexpected token in statement");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Options->setNoreorder();
|
Options.setNoreorder();
|
||||||
Parser.Lex(); // Consume the EndOfStatement
|
Parser.Lex(); // Consume the EndOfStatement
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1101,7 +1100,7 @@ bool MipsAsmParser::parseSetMacroDirective() {
|
|||||||
reportParseError("unexpected token in statement");
|
reportParseError("unexpected token in statement");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Options->setMacro();
|
Options.setMacro();
|
||||||
Parser.Lex(); // Consume the EndOfStatement
|
Parser.Lex(); // Consume the EndOfStatement
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1113,11 +1112,11 @@ bool MipsAsmParser::parseSetNoMacroDirective() {
|
|||||||
reportParseError("`noreorder' must be set before `nomacro'");
|
reportParseError("`noreorder' must be set before `nomacro'");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (Options->isReorder()) {
|
if (Options.isReorder()) {
|
||||||
reportParseError("`noreorder' must be set before `nomacro'");
|
reportParseError("`noreorder' must be set before `nomacro'");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Options->setNomacro();
|
Options.setNomacro();
|
||||||
Parser.Lex(); // Consume the EndOfStatement
|
Parser.Lex(); // Consume the EndOfStatement
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user