mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
[mips] Make MipsAsmParser::parseCCRRegs return NoMatch instead of ParseFail
when there wasn't a match. This behavior is consistent with other register parsing methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f32ec17b9f
commit
94ce6dadd1
@ -1451,7 +1451,7 @@ MipsAsmParser::OperandMatchResultTy
|
|||||||
MipsAsmParser::parseCCRRegs(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
MipsAsmParser::parseCCRRegs(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||||
// If the first token is not '$' we have an error.
|
// If the first token is not '$' we have an error.
|
||||||
if (Parser.getTok().isNot(AsmToken::Dollar))
|
if (Parser.getTok().isNot(AsmToken::Dollar))
|
||||||
return MatchOperand_ParseFail;
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
SMLoc S = Parser.getTok().getLoc();
|
SMLoc S = Parser.getTok().getLoc();
|
||||||
Parser.Lex(); // Eat the '$'
|
Parser.Lex(); // Eat the '$'
|
||||||
@ -1459,7 +1459,7 @@ MipsAsmParser::parseCCRRegs(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
|||||||
const AsmToken &Tok = Parser.getTok(); // Get next token.
|
const AsmToken &Tok = Parser.getTok(); // Get next token.
|
||||||
|
|
||||||
if (Tok.isNot(AsmToken::Integer))
|
if (Tok.isNot(AsmToken::Integer))
|
||||||
return MatchOperand_ParseFail;
|
return MatchOperand_NoMatch;
|
||||||
|
|
||||||
unsigned Reg = matchRegisterByNumber(Tok.getIntVal(), Mips::CCRRegClassID);
|
unsigned Reg = matchRegisterByNumber(Tok.getIntVal(), Mips::CCRRegClassID);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user