summaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMBaseRegisterInfo.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-01-06 23:45:18 +0000
committerJim Grosbach <grosbach@apple.com>2010-01-06 23:45:18 +0000
commitce3e769c15be90463abf14bb71b5a8e1205d3661 (patch)
tree494518fc9cc970f251f965ed8e1bb230c896b404 /lib/Target/ARM/ARMBaseRegisterInfo.cpp
parent80c2b0d9efc951b23f90a3cf12b9853177994961 (diff)
downloadexternal_llvm-ce3e769c15be90463abf14bb71b5a8e1205d3661.zip
external_llvm-ce3e769c15be90463abf14bb71b5a8e1205d3661.tar.gz
external_llvm-ce3e769c15be90463abf14bb71b5a8e1205d3661.tar.bz2
Addressing mode 6 (load/store) instructions can't encode an immediate offset
for stack references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.cpp')
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 7aebdf4..90a6177 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -523,7 +523,7 @@ static unsigned estimateStackSize(MachineFunction &MF, MachineFrameInfo *MFI) {
/// estimateRSStackSizeLimit - Look at each instruction that references stack
/// frames and return the stack size limit beyond which some of these
-/// instructions will require scratch register during their expansion later.
+/// instructions will require a scratch register during their expansion later.
unsigned
ARMBaseRegisterInfo::estimateRSStackSizeLimit(MachineFunction &MF) const {
unsigned Limit = (1 << 12) - 1;
@@ -547,6 +547,9 @@ ARMBaseRegisterInfo::estimateRSStackSizeLimit(MachineFunction &MF) const {
// When the stack offset is negative, we will end up using
// the i8 instructions instead.
return (1 << 8) - 1;
+
+ if (AddrMode == ARMII::AddrMode6)
+ return 0;
break; // At most one FI per instruction
}
}