aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index c93473d..41b061a 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -1121,18 +1121,22 @@ eliminateFrameIndex(MachineBasicBlock::iterator II,
break;
}
case ARMII::AddrModeT2_i12: {
- ImmIdx = i+2;
+ ImmIdx = i+1;
InstrOffs = MI.getOperand(ImmIdx).getImm();
NumBits = 12;
break;
}
- case ARMII::AddrModeT2_so:
case ARMII::AddrModeT2_i8: {
- ImmIdx = i+2;
+ ImmIdx = i+1;
InstrOffs = MI.getOperand(ImmIdx).getImm();
NumBits = 8;
break;
}
+ case ARMII::AddrModeT2_so: {
+ ImmIdx = i+2;
+ InstrOffs = MI.getOperand(ImmIdx).getImm();
+ break;
+ }
default:
LLVM_UNREACHABLE("Unsupported addressing mode!");
break;