Add a sanity check assert() for t2ADD/SUBrSPi instructions that they really are

referencing the stack pointer as they say they are.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121347 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-12-09 01:22:19 +00:00
parent cde31293d4
commit 9702e6075c

View File

@ -716,6 +716,13 @@ void ARMAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
switch (MI->getOpcode()) {
default: break;
case ARM::t2ADDrSPi:
case ARM::t2ADDrSPi12:
case ARM::t2SUBrSPi:
case ARM::t2SUBrSPi12:
assert (MI->getOperand(1).getReg() == ARM::SP);
break;
case ARM::t2MOVi32imm: assert(0 && "Should be lowered by thumb2it pass");
case ARM::DBG_VALUE: {
if (isVerbose() && OutStreamer.hasRawTextSupport()) {