aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-20 10:17:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-20 10:17:53 +0000
commit2bd7b2b41fbfb4fd3f93b1e93a9e68e678fbce16 (patch)
tree06257de7ec4e3cb8bef05d707e1f41f542908e1e
parent5ad334fbda276512e492a77601715e8e5e2b188e (diff)
One more try...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33400 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index 477267ad56..3579b8439a 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -998,12 +998,13 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
// Get the number of bytes to allocate from the FrameInfo
unsigned NumBytes = MFI->getStackSize();
- if (MFI->hasCalls() && !hasFP(MF))
+ if (MFI->hasCalls() || MF.getFrameInfo()->hasVarSizedObjects()) {
// When we have no frame pointer, we reserve argument space for call sites
// in the function immediately on entry to the current function. This
// eliminates the need for add/sub ESP brackets around call sites.
//
- NumBytes += MFI->getMaxCallFrameSize();
+ if (!hasFP(MF))
+ NumBytes += MFI->getMaxCallFrameSize();
// Round the size to a multiple of the alignment (don't forget the 4/8 byte
// offset pushed by the caller though). No need to align the stack if this