if (DefSymbol.startswith("$")) {
OperandMatchResultTy ResTy =
MatchAnyRegisterNameWithoutDollar(Operands, DefSymbol.substr(1), S);
- if (ResTy == MatchOperand_Success)
+ if (ResTy == MatchOperand_Success) {
+ Parser.Lex();
return true;
- else if (ResTy == MatchOperand_ParseFail)
+ } else if (ResTy == MatchOperand_ParseFail)
llvm_unreachable("Should never ParseFail");
return false;
}
SMLoc S) {
int Index = matchCPURegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateGPRReg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
Index = matchFPURegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateFGRReg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
Index = matchFCCRegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateFCCReg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
Index = matchACRegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateACCReg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
Index = matchMSA128RegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateMSA128Reg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
Index = matchMSA128CtrlRegisterName(Identifier);
if (Index != -1) {
- Parser.Lex();
Operands.push_back(MipsOperand::CreateMSACtrlReg(
Index, getContext().getRegisterInfo(), S, getLexer().getLoc(), *this));
return MatchOperand_Success;
if (Token.is(AsmToken::Identifier)) {
DEBUG(dbgs() << ".. identifier\n");
StringRef Identifier = Token.getIdentifier();
- return MatchAnyRegisterNameWithoutDollar(Operands, Identifier, S);
+ OperandMatchResultTy ResTy =
+ MatchAnyRegisterNameWithoutDollar(Operands, Identifier, S);
+ if (ResTy == MatchOperand_Success)
+ Parser.Lex();
+ return ResTy;
} else if (Token.is(AsmToken::Integer)) {
DEBUG(dbgs() << ".. integer\n");
Operands.push_back(MipsOperand::CreateNumericReg(