PR3739, part 1: Disable the red zone on Win64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2009-06-04 02:02:01 +00:00
parent e5eb6d2fdb
commit 9a41712122
2 changed files with 11 additions and 1 deletions

View File

@ -754,7 +754,8 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
if (Is64Bit && !DisableRedZone &&
!needsStackRealignment(MF) &&
!MFI->hasVarSizedObjects() && // No dynamic alloca.
!MFI->hasCalls()) { // No calls.
!MFI->hasCalls() && // No calls.
!Subtarget->isTargetWin64()) { // Win64 has no Red Zone
uint64_t MinSize = X86FI->getCalleeSavedFrameSize();
if (hasFP(MF)) MinSize += SlotSize;
StackSize = std::max(MinSize,

View File

@ -0,0 +1,9 @@
; RUN: llvm-as < %s | llc | grep "subq.*\\\$8, \\\%rsp"
target triple = "x86_64-mingw64"
define x86_fp80 @a(i64 %x) nounwind readnone {
entry:
%conv = sitofp i64 %x to x86_fp80 ; <x86_fp80> [#uses=1]
ret x86_fp80 %conv
}