mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Use TryParseRegister() instead of MatchRegisterName(). The former returns -1
while the latter doesn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
019e378754
commit
1d6a26507b
@ -434,13 +434,12 @@ ARMOperand *ARMAsmParser::ParseRegisterList() {
|
||||
Error(RegLoc, "register expected");
|
||||
return 0;
|
||||
}
|
||||
int RegNum = MatchRegisterName(RegTok.getString());
|
||||
int RegNum = TryParseRegister();
|
||||
if (RegNum == -1) {
|
||||
Error(RegLoc, "register expected");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Parser.Lex(); // Eat identifier token.
|
||||
unsigned RegList = 1 << RegNum;
|
||||
|
||||
int HighRegNum = RegNum;
|
||||
@ -454,7 +453,7 @@ ARMOperand *ARMAsmParser::ParseRegisterList() {
|
||||
Error(RegLoc, "register expected");
|
||||
return 0;
|
||||
}
|
||||
int RegNum = MatchRegisterName(RegTok.getString());
|
||||
int RegNum = TryParseRegister();
|
||||
if (RegNum == -1) {
|
||||
Error(RegLoc, "register expected");
|
||||
return 0;
|
||||
@ -466,8 +465,6 @@ ARMOperand *ARMAsmParser::ParseRegisterList() {
|
||||
Warning(RegLoc, "register not in ascending order in register list");
|
||||
RegList |= 1 << RegNum;
|
||||
HighRegNum = RegNum;
|
||||
|
||||
Parser.Lex(); // Eat identifier token.
|
||||
}
|
||||
const AsmToken &RCurlyTok = Parser.getTok();
|
||||
if (RCurlyTok.isNot(AsmToken::RCurly)) {
|
||||
|
Loading…
Reference in New Issue
Block a user