summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFrameLowering.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2018-12-07 13:43:55 +0000
committerTim Northover <tnorthover@apple.com>2018-12-07 13:43:55 +0000
commit4bf394be3a1cf5439e9c404c6b6b4310b7954f28 (patch)
tree373ccfde3d2ab516d89ed61f4c776696877bbd27 /llvm/lib/Target/ARM/ARMFrameLowering.cpp
parent143a9e0b1236d42d12f872eef0cb8fde026db1da (diff)
downloadbcm5719-llvm-4bf394be3a1cf5439e9c404c6b6b4310b7954f28.tar.gz
bcm5719-llvm-4bf394be3a1cf5439e9c404c6b6b4310b7954f28.zip
ARM: use correct offset from base pointer (r6) in call frame regions.
When we had dynamic call frames (i.e. sp adjustment around each call) we were including that adjustment into offsets calculated based on r6, even though it's only sp that changes. This led to incorrect stack slot accesses. llvm-svn: 348591
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFrameLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index d1e4bce1e0c..2417166ca96 100644
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -911,6 +911,7 @@ ARMFrameLowering::ResolveFrameIndexReference(const MachineFunction &MF,
assert(RegInfo->hasBasePointer(MF) &&
"VLAs and dynamic stack alignment, but missing base pointer!");
FrameReg = RegInfo->getBaseRegister();
+ Offset -= SPAdj;
}
return Offset;
}
OpenPOWER on IntegriCloud