This has been implemented.
[oota-llvm.git] / lib / Target / X86 / X86FrameLowering.cpp
index e04d5d42b6e26086def25ac18d86931bcf2d5fd3..0a3f931acf9384a1979b02f343f643fcd77aa6a7 100644 (file)
@@ -318,7 +318,7 @@ void X86FrameLowering::emitCalleeSavedFrameMoves(MachineFunction &MF,
     // move" for this extra "PUSH", the linker will lose track of the fact that
     // the frame pointer should have the value of the first "PUSH" when it's
     // trying to unwind.
-    // 
+    //
     // FIXME: This looks inelegant. It's possibly correct, but it's covering up
     //        another bug. I.e., one where we generate a prolog like this:
     //
@@ -397,11 +397,6 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
     if (HasFP) MinSize += SlotSize;
     StackSize = std::max(MinSize, StackSize > 128 ? StackSize - 128 : 0);
     MFI->setStackSize(StackSize);
-  } else if (IsWin64) {
-    // We need to always allocate 32 bytes as register spill area.
-    // FIXME: We might reuse these 32 bytes for leaf functions.
-    StackSize += 32;
-    MFI->setStackSize(StackSize);
   }
 
   // Insert stack pointer adjustment for later moving of return addr.  Only
@@ -594,8 +589,8 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
                                       StackPtr, false, NumBytes - 4);
       MBB.insert(MBBI, MI);
     }
-  } else if (NumBytes >= 4096 && 
-             STI.isTargetWin64() && 
+  } else if (NumBytes >= 4096 &&
+             STI.isTargetWin64() &&
              !STI.isTargetEnvMacho()) {
     // Sanity check that EAX is not livein for this function.  It should
     // not be, so throw an assert.