Thumb1 diagnostics for reglist on PUSH/POP fix.

Was not checking the first register in the register list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-11-10 23:01:27 +00:00
parent c55346d39a
commit fae02597bb

View File

@ -4528,14 +4528,14 @@ validateInstruction(MCInst &Inst,
}
case ARM::tPOP: {
bool listContainsBase;
if (checkLowRegisterList(Inst, 3, 0, ARM::PC, listContainsBase))
if (checkLowRegisterList(Inst, 2, 0, ARM::PC, listContainsBase))
return Error(Operands[2]->getStartLoc(),
"registers must be in range r0-r7 or pc");
break;
}
case ARM::tPUSH: {
bool listContainsBase;
if (checkLowRegisterList(Inst, 3, 0, ARM::LR, listContainsBase))
if (checkLowRegisterList(Inst, 2, 0, ARM::LR, listContainsBase))
return Error(Operands[2]->getStartLoc(),
"registers must be in range r0-r7 or lr");
break;