[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Fri Feb 2 15:08:56 PST 2007
Changes in directory llvm/lib/Target/ARM:
ARMRegisterInfo.cpp updated: 1.55 -> 1.56
---
Log message:
bugfix: SP isn't resetted when function has FP and there is no spills.
---
Diffs of the changes: (+3 -2)
ARMRegisterInfo.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.55 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.56
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.55 Fri Feb 2 15:08:39 2007
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Fri Feb 2 17:08:40 2007
@@ -1140,10 +1140,11 @@
if (STI.isTargetDarwin() || hasFP(MF)) {
NumBytes = AFI->getFramePtrSpillOffset() - NumBytes;
// Reset SP based on frame pointer only if the stack frame extends beyond
- // frame pointer stack slot.
+ // frame pointer stack slot or target is ELF and the function has FP.
if (AFI->getGPRCalleeSavedArea2Size() ||
AFI->getDPRCalleeSavedAreaSize() ||
- AFI->getDPRCalleeSavedAreaOffset())
+ AFI->getDPRCalleeSavedAreaOffset()||
+ hasFP(MF))
if (NumBytes)
BuildMI(MBB, MBBI, TII.get(ARM::SUBri), ARM::SP).addReg(FramePtr)
.addImm(NumBytes);
More information about the llvm-commits
mailing list