From a113eb02057c304164ded0d124c962ce32638f39 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Thu, 10 Nov 2011 23:01:27 +0000 Subject: [PATCH] Thumb1 diagnostics for reglist on PUSH/POP fix. Was not checking the first register in the register list. llvm-svn: 144329 --- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index d8870532dafc..0cc2e5ad591a 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -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;