PR3739, part 1: Disable the red zone on Win64.
llvm-svn: 72830
This commit is contained in:
parent
aba72ed47f
commit
0cb0c78a26
|
|
@ -754,7 +754,8 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
if (Is64Bit && !DisableRedZone &&
|
if (Is64Bit && !DisableRedZone &&
|
||||||
!needsStackRealignment(MF) &&
|
!needsStackRealignment(MF) &&
|
||||||
!MFI->hasVarSizedObjects() && // No dynamic alloca.
|
!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();
|
uint64_t MinSize = X86FI->getCalleeSavedFrameSize();
|
||||||
if (hasFP(MF)) MinSize += SlotSize;
|
if (hasFP(MF)) MinSize += SlotSize;
|
||||||
StackSize = std::max(MinSize,
|
StackSize = std::max(MinSize,
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue