aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-01 20:44:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-01 20:44:52 +0000
commit556f33c6e25b9f85abccc9568974df7ecc202ec0 (patch)
treefc2310deef8a111a84fd4109b4f96fa4ac0c791f
parent8282e3f92b9ba140ad8fbf0fae29c79161128111 (diff)
Pasto. Lots of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33762 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 02b15207ba..35066faf55 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -311,12 +311,10 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn,
Scale = 4; // Taking the address of a CP entry.
break;
case ARMII::AddrMode2:
- Bits = 12;
- Scale = 2; // +-offset_12
+ Bits = 12; // +-offset_12
break;
case ARMII::AddrMode3:
- Bits = 8;
- Scale = 2; // +-offset_8
+ Bits = 8; // +-offset_8
break;
// addrmode4 has no immediate offset.
case ARMII::AddrMode5:
@@ -342,7 +340,7 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn,
// Remember that this is a user of a CP entry.
MachineInstr *CPEMI =CPEMIs[I->getOperand(op).getConstantPoolIndex()];
- unsigned MaxOffs = (1 << (Bits-1)) * Scale;
+ unsigned MaxOffs = ((1 << Bits)-1) * Scale;
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs));
// Instructions can only use one CP entry, don't bother scanning the