mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 06:38:44 +00:00
ARM: correct an off-by-one in an assert
The assert was off-by-one, resulting in failures for valid input. Thanks to Asiri Rathnayake for pointing out the failure! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd350586f5
commit
de9e32a55d
@ -77,7 +77,10 @@ static bool getITDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
|
||||
|
||||
static bool getARMStoreDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
|
||||
std::string &Info) {
|
||||
assert(MI.getNumOperands() > 4 && "expected >4 arguments");
|
||||
if (STI.getFeatureBits() & llvm::ARM::ModeThumb)
|
||||
return false;
|
||||
|
||||
assert(MI.getNumOperands() >= 4 && "expected >= 4 arguments");
|
||||
for (unsigned OI = 4, OE = MI.getNumOperands(); OI < OE; ++OI) {
|
||||
assert(MI.getOperand(OI).isReg() && "expected register");
|
||||
if (MI.getOperand(OI).getReg() == ARM::SP ||
|
||||
|
@ -145,3 +145,9 @@ push:
|
||||
@ CHECK: push {sp}
|
||||
@ CHECK: ^
|
||||
|
||||
.global single
|
||||
.type single,%function
|
||||
single:
|
||||
stmdaeq r0, {r0}
|
||||
@ CHECK-NOT: warning
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user