]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_compute_frame_layout): Do not add bottom alignment for leaf functions.
authorRichard Henderson <rth@redhat.com>
Tue, 28 May 2002 20:29:43 +0000 (13:29 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 28 May 2002 20:29:43 +0000 (13:29 -0700)
        * config/i386/i386.c (ix86_compute_frame_layout): Do not add
        bottom alignment for leaf functions.

From-SVN: r53966

gcc/ChangeLog
gcc/config/i386/i386.c

index 831b5252ad7e2b2f6a558589071eff6882cb012c..b3042f76770e57d5a0121881e49051247c82d369 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-28  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/i386.c (ix86_compute_frame_layout): Do not add
+       bottom alignment for leaf functions.
+
 Mon May 27 10:37:28 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * reload.c (find_valid_class): Accept new argument DEST,
index 74297d04c01df349930e8cb85724806161e487de..bf9fb6d5738555fc338d92eb47596a580c2ec83a 100644 (file)
@@ -4015,8 +4015,9 @@ ix86_compute_frame_layout (frame)
 
   offset += size;
 
-  /* Add outgoing arguments area.  */
-  if (ACCUMULATE_OUTGOING_ARGS)
+  /* Add outgoing arguments area.  Can be skipped if we eliminated
+     all the function calls as dead code.  */
+  if (ACCUMULATE_OUTGOING_ARGS && !current_function_is_leaf)
     {
       offset += current_function_outgoing_args_size;
       frame->outgoing_arguments_size = current_function_outgoing_args_size;
@@ -4024,9 +4025,12 @@ ix86_compute_frame_layout (frame)
   else
     frame->outgoing_arguments_size = 0;
 
-  /* Align stack boundary.  */
-  frame->padding2 = ((offset + preferred_alignment - 1)
-                    & -preferred_alignment) - offset;
+  /* Align stack boundary.  Only needed if we're calling another function.  */
+  if (!current_function_is_leaf)
+    frame->padding2 = ((offset + preferred_alignment - 1)
+                      & -preferred_alignment) - offset;
+  else
+    frame->padding2 = 0;
 
   offset += frame->padding2;