C90 prototype updates.
[gcc.git] / gcc / calls.c
index fa4f93473c53061f80fe602352e6939c3da679bb..18df59a92c27f3e04b02c6d1d9fead4eca3286d6 100644 (file)
@@ -41,10 +41,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "cgraph.h"
 #include "except.h"
 
-#ifndef STACK_POINTER_OFFSET
-#define STACK_POINTER_OFFSET    0
-#endif
-
 /* Like PREFERRED_STACK_BOUNDARY but in units of bytes, not bits.  */
 #define STACK_BYTES (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)
 
@@ -530,10 +526,6 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN
      if the context of the call as a whole permits.  */
   inhibit_defer_pop = old_inhibit_defer_pop;
 
-  /* Don't bother cleaning up after a noreturn function.  */
-  if (ecf_flags & (ECF_NORETURN | ECF_LONGJMP))
-    return;
-
   if (n_popped > 0)
     {
       if (!already_popped)
@@ -557,7 +549,7 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN
 
       if (rounded_stack_size != 0)
        {
-         if (ecf_flags & ECF_SP_DEPRESSED)
+         if (ecf_flags & (ECF_SP_DEPRESSED | ECF_NORETURN | ECF_LONGJMP))
            /* Just pretend we did the pop.  */
            stack_pointer_delta -= rounded_stack_size;
          else if (flag_defer_pop && inhibit_defer_pop == 0
@@ -2357,7 +2349,7 @@ expand_call (tree exp, rtx target, int ignore)
 
   /* Start updating where the next arg would go.
 
-     On some machines (such as the PA) indirect calls have a difuferent
+     On some machines (such as the PA) indirect calls have a different
      calling convention than normal calls.  The last argument in
      INIT_CUMULATIVE_ARGS tells the backend if this is an indirect call
      or not.  */
@@ -3171,9 +3163,14 @@ expand_call (tree exp, rtx target, int ignore)
 
          emit_barrier_after (last);
 
-         /* Stack adjustments after a noreturn call are dead code.  */
-         stack_pointer_delta = old_stack_allocated;
-         pending_stack_adjust = 0;
+         /* Stack adjustments after a noreturn call are dead code.
+            However when NO_DEFER_POP is in effect, we must preserve
+            stack_pointer_delta.  */
+         if (inhibit_defer_pop == 0)
+           {
+             stack_pointer_delta = old_stack_allocated;
+             pending_stack_adjust = 0;
+           }
        }
 
       if (flags & ECF_LONGJMP)