diff options
author | Richard Henderson <rth@cygnus.com> | 2000-01-30 13:27:22 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-01-30 13:27:22 -0800 |
commit | eebe34b49fdc81cdc2a46d88ae4c29cf916181c3 (patch) | |
tree | 6cd287f50d442e5b3cbdd049fe1248a3bf8bff97 | |
parent | c112e233c5f47edebd653e743a8f7db3d682091f (diff) | |
download | gcc-eebe34b49fdc81cdc2a46d88ae4c29cf916181c3.zip gcc-eebe34b49fdc81cdc2a46d88ae4c29cf916181c3.tar.gz gcc-eebe34b49fdc81cdc2a46d88ae4c29cf916181c3.tar.bz2 |
i386.c (ix86_compute_frame_size): Omit padding1 if the local frame size is zero.
* i386.c (ix86_compute_frame_size): Omit padding1 if the
local frame size is zero.
From-SVN: r31703
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07875c8..f8de2e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2000-01-30 Richard Henderson <rth@cygnus.com> + * i386.c (ix86_compute_frame_size): Omit padding1 if the + local frame size is zero. + +2000-01-30 Richard Henderson <rth@cygnus.com> + * alpha.c (alpha_expand_epilogue): Don't emit the return insn. * alpha.h (EPILOGUE_USES): New. Mark $26 live. * alpha.md (return): Turn into an expander. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a5f2524..69d71ce 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1734,7 +1734,6 @@ ix86_compute_frame_size (size, nregs_on_stack, rpadding1, rpadding2) int stack_alignment_needed = cfun->stack_alignment_needed / BITS_PER_UNIT; nregs = ix86_nsaved_regs (); - total_size = size; #ifdef PREFERRED_STACK_BOUNDARY @@ -1762,9 +1761,12 @@ ix86_compute_frame_size (size, nregs_on_stack, rpadding1, rpadding2) total_size += offset; /* Align start of frame for local function. */ - padding1 = ((offset + stack_alignment_needed - 1) - & -stack_alignment_needed) - offset; - total_size += padding1; + if (size > 0) + { + padding1 = ((offset + stack_alignment_needed - 1) + & -stack_alignment_needed) - offset; + total_size += padding1; + } /* Align stack boundary. */ if (!current_function_is_leaf) @@ -1775,10 +1777,8 @@ ix86_compute_frame_size (size, nregs_on_stack, rpadding1, rpadding2) if (nregs_on_stack) *nregs_on_stack = nregs; - if (rpadding1) *rpadding1 = padding1; - if (rpadding2) *rpadding2 = padding2; |