Respect the DisableRedZone flag on PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-01-27 19:19:28 +00:00
parent c03e9a1040
commit 9e79091f1a

View File

@ -893,7 +893,8 @@ void PPCRegisterInfo::determineFrameLayout(MachineFunction &MF) const {
// If we are a leaf function, and use up to 224 bytes of stack space, // If we are a leaf function, and use up to 224 bytes of stack space,
// don't have a frame pointer, calls, or dynamic alloca then we do not need // don't have a frame pointer, calls, or dynamic alloca then we do not need
// to adjust the stack pointer (we fit in the Red Zone). // to adjust the stack pointer (we fit in the Red Zone).
if (FrameSize <= 224 && // Fits in red zone. if (!DisableRedZone &&
FrameSize <= 224 && // Fits in red zone.
!MFI->hasVarSizedObjects() && // No dynamic alloca. !MFI->hasVarSizedObjects() && // No dynamic alloca.
!MFI->hasCalls() && // No calls. !MFI->hasCalls() && // No calls.
(!ALIGN_STACK || MaxAlign <= TargetAlign)) { // No special alignment. (!ALIGN_STACK || MaxAlign <= TargetAlign)) { // No special alignment.