This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to avoid copying tail padding (was: GCC 3.2)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Sep 2002 14:51:22 +0100
- Subject: Re: PATCH to avoid copying tail padding (was: GCC 3.2)
- References: <40360000.1027723811@gandalf.codesourcery.com><200207271635.12319@enzo.bigblue.local><wvlptx6m7pd.fsf@prospero.cambridge.redhat.com><wvly9bsk9gg.fsf@prospero.cambridge.redhat.com><3000000.1028131037@gandalf.codesourcery.com><wvl8z3qjlxc.fsf@prospero.cambridge.redhat.com><wvlfzxxiicg.fsf_-_@prospero.cambridge.redhat.com><wvl8z2xpzrb.fsf@prospero.cambridge.redhat.com><wvl1y8iisyl.fsf@prospero.cambridge.redhat.com><wvlr8gegnpf.fsf@prospero.cambridge.redhat.com>
One more problem: we were using expr_size in store_one_arg to determine how
much space to push. That amount should be determined by the size of the
type, not the data size of the expression.
Tested i686-pc-linux-gnu, applied trunk and 3.2 branch.
2002-09-12 Jason Merrill <jason@redhat.com>
* calls.c (store_one_arg): Use size_in_bytes to determine the
amount of space to push.
*** calls.c.~1~ Fri Aug 30 20:34:24 2002
--- calls.c Tue Sep 10 13:37:50 2002
*************** store_one_arg (arg, argblock, flags, var
*** 4512,4518 ****
emit_push_insn for BLKmode is careful to avoid it. */
excess = (arg->size.constant - int_size_in_bytes (TREE_TYPE (pval))
+ partial * UNITS_PER_WORD);
! size_rtx = expr_size (pval);
}
if ((flags & ECF_SIBCALL) && GET_CODE (arg->value) == MEM)
--- 4512,4519 ----
emit_push_insn for BLKmode is careful to avoid it. */
excess = (arg->size.constant - int_size_in_bytes (TREE_TYPE (pval))
+ partial * UNITS_PER_WORD);
! size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)),
! NULL_RTX, TYPE_MODE (sizetype), 0);
}
if ((flags & ECF_SIBCALL) && GET_CODE (arg->value) == MEM)