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

llvm-svn: 72830
This commit is contained in:
Eli Friedman 2009-06-04 02:02:01 +00:00
parent aba72ed47f
commit 0cb0c78a26
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
}