Remove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't...
authorEvan Cheng <evan.cheng@apple.com>
Thu, 4 Sep 2008 01:04:15 +0000 (01:04 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 4 Sep 2008 01:04:15 +0000 (01:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55756 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/fast-cc-callee-pops.ll

index 9b492fbb1d8e66908a559e7dc450a4c01aa2f652..cd01c644260a1b48ab75ae8a14378ba796a5424a 100644 (file)
@@ -1379,14 +1379,6 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG) {
     }
   }
   
-  // Make sure the instruction takes 8n+4 bytes to make sure the start of the
-  // arguments and the arguments after the retaddr has been pushed are
-  // aligned.
-  if (!Is64Bit && CC == CallingConv::X86_FastCall &&
-      !Subtarget->isTargetCygMing() && !Subtarget->isTargetWindows() &&
-      (StackSize & 7) == 0)
-    StackSize += 4;
-
   ArgValues.push_back(Root);
 
   // Some CCs need callee pop.
@@ -1494,13 +1486,6 @@ SDValue X86TargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) {
   if (CC == CallingConv::Fast)
     NumBytes = GetAlignedArgumentStackSize(NumBytes, DAG);
 
-  // Make sure the instruction takes 8n+4 bytes to make sure the start of the
-  // arguments and the arguments after the retaddr has been pushed are aligned.
-  if (!Is64Bit && CC == CallingConv::X86_FastCall &&
-      !Subtarget->isTargetCygMing() && !Subtarget->isTargetWindows() &&
-      (NumBytes & 7) == 0)
-    NumBytes += 4;
-
   int FPDiff = 0;
   if (IsTailCall) {
     // Lower arguments at fp - stackoffset + fpdiff.
index 9b03634b853b13a3fb66a2b1690f407c5224aa7b..941f7087f6241dd5b66dd9651d89f9b832714623 100644 (file)
@@ -3,6 +3,6 @@
 
 ; Check that a fastcc function pops its stack variables before returning.
 
-define x86_fastcallcc void @func(i64 %X, i64 %Y, float %G, double %Z) {
+define x86_fastcallcc void @func(i64 %X, i64 %Y, float %G, double %Z) nounwind {
         ret void
 }