aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Michel <scottm@aero.org>2008-11-08 05:16:20 +0000
committerScott Michel <scottm@aero.org>2008-11-08 05:16:20 +0000
commit771138ca915591d804f731e1e0e189cf0a2a6803 (patch)
tree1b6c7b9c7b5d655ecf798502ad8ac0cc08ac8030
parent746867c8b6ded86e450131852d0949644f54927c (diff)
CellSPU: Fix prologue/epilogue emission when function contains calls but
theframe size is 0; the prologue and epilogue should be emitted in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58890 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/CellSPU/SPURegisterInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CellSPU/SPURegisterInfo.cpp b/lib/Target/CellSPU/SPURegisterInfo.cpp
index eff6d6a36c..beea0dfb02 100644
--- a/lib/Target/CellSPU/SPURegisterInfo.cpp
+++ b/lib/Target/CellSPU/SPURegisterInfo.cpp
@@ -438,7 +438,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
assert((FrameSize & 0xf) == 0
&& "SPURegisterInfo::emitPrologue: FrameSize not aligned");
- if (FrameSize > 0) {
+ if (FrameSize > 0 || MFI->hasCalls()) {
FrameSize = -(FrameSize + SPUFrameInfo::minStackSize());
if (hasDebugInfo) {
// Mark effective beginning of when frame pointer becomes valid.
@@ -534,7 +534,7 @@ SPURegisterInfo::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const
"Can only insert epilog into returning blocks");
assert((FrameSize & 0xf) == 0
&& "SPURegisterInfo::emitEpilogue: FrameSize not aligned");
- if (FrameSize > 0) {
+ if (FrameSize > 0 || MFI->hasCalls()) {
FrameSize = FrameSize + SPUFrameInfo::minStackSize();
if (isS10Constant(FrameSize + LinkSlotOffset)) {
// Reload $lr, adjust $sp by required amount