mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
ARM ldm/stm register lists can be out of order.
It's not a good style idea, as the registers will be laid down in memory in numerical order, not the order they're in the list, but it's legal. vldm/vstm are stricter. rdar://11064740 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2854,8 +2854,12 @@ 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))
|
||||
return Error(RegLoc, "register list not in ascending order");
|
||||
if (getARMRegisterNumbering(Reg) < getARMRegisterNumbering(OldReg)) {
|
||||
if (ARMMCRegisterClasses[ARM::GPRRegClassID].contains(Reg))
|
||||
Warning(RegLoc, "register list not in ascending order");
|
||||
else
|
||||
return Error(RegLoc, "register list not in ascending order");
|
||||
}
|
||||
if (getARMRegisterNumbering(Reg) == getARMRegisterNumbering(OldReg)) {
|
||||
Warning(RegLoc, "duplicated register (" + RegTok.getString() +
|
||||
") in register list");
|
||||
|
||||
Reference in New Issue
Block a user