diff options
author | Richard Henderson <rth@redhat.com> | 2002-05-28 13:27:45 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-05-28 13:27:45 -0700 |
commit | 0b7ae56590f7d722c275057bb1c076ec16623d01 (patch) | |
tree | 9ee0a47e45ceb034f0cc3cfa471a997423d3eae0 /gcc | |
parent | 16069d69ac053449065e5f74b121120b44d7f97b (diff) | |
download | gcc-0b7ae56590f7d722c275057bb1c076ec16623d01.zip gcc-0b7ae56590f7d722c275057bb1c076ec16623d01.tar.gz gcc-0b7ae56590f7d722c275057bb1c076ec16623d01.tar.bz2 |
i386.c (ix86_compute_frame_layout): Do not add bottom alignment for leaf functions.
* config/i386/i386.c (ix86_compute_frame_layout): Do not add
bottom alignment for leaf functions.
From-SVN: r53965
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 356c1b6..54e828f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. + 2002-05-28 Zack Weinberg <zack@codesourcery.com> * config/pa/milli32.S, config/pa/lib1funcs.asm, diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cf2def2..39831af 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4138,8 +4138,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; @@ -4147,9 +4148,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; |