CellSPU: Fix prologue/epilogue emission when function contains calls but

theframe size is 0; the prologue and epilogue should be emitted in this case.

llvm-svn: 58890
This commit is contained in:
Scott Michel 2008-11-08 05:16:20 +00:00
parent 8ec8048f93
commit 1ccbbc3d07
1 changed files with 2 additions and 2 deletions

View File

@ -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