mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
ARM asm parser, just issue a warning for a duplicate reg in a list.
For better 'gas' compatibility. llvm-svn: 146185
This commit is contained in:
parent
edfacfabb8
commit
01485b7e6e
@ -2596,6 +2596,7 @@ parseRegisterList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||
Parser.Lex(); // Eat the comma.
|
||||
RegLoc = Parser.getTok().getLoc();
|
||||
int OldReg = Reg;
|
||||
const AsmToken RegTok = Parser.getTok();
|
||||
Reg = tryParseRegister();
|
||||
if (Reg == -1)
|
||||
return Error(RegLoc, "register expected");
|
||||
@ -2609,8 +2610,13 @@ parseRegisterList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||
if (!RC->contains(Reg))
|
||||
return Error(RegLoc, "invalid register in register list");
|
||||
// List must be monotonically increasing.
|
||||
if (getARMRegisterNumbering(Reg) <= getARMRegisterNumbering(OldReg))
|
||||
if (getARMRegisterNumbering(Reg) < getARMRegisterNumbering(OldReg))
|
||||
return Error(RegLoc, "register list not in ascending order");
|
||||
if (getARMRegisterNumbering(Reg) == getARMRegisterNumbering(OldReg)) {
|
||||
Warning(RegLoc, "duplicated register (" + RegTok.getString() +
|
||||
") in register list");
|
||||
continue;
|
||||
}
|
||||
// VFP register lists must also be contiguous.
|
||||
// It's OK to use the enumeration values directly here rather, as the
|
||||
// VFP register classes have the enum sorted properly.
|
||||
|
Loading…
Reference in New Issue
Block a user