This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix sibcall memory trample.
- To: grahams at redhat dot com
- Subject: Re: Fix sibcall memory trample.
- From: Roman Lechtchinsky <rl at cs dot tu-berlin dot de>
- Date: Tue, 31 Jul 2001 15:59:05 +0200 (MET DST)
- cc: gcc-patches at gcc dot gnu dot org
Hi,
this breaks passing parameters smaller than a register on the
alphaev5-cray-unicosmk. Sorry about the late reply but I didn't notice
this before as this only shows up when running the testsuite.
> The cause is in function.c:locate_and_pad_parm which calls
> calls to pad_below aligns parameters on PARAM_BOUNDARY but
> this extra padding was not reflected on the size of the final
> argument list.
AFAICS, this is not really true. locate_and_pad_parm does include the
padding in *arg_size_ptr (see the very bottom of the function) which then
is added to the total parameter size, at least in assign_parms (i.e. for
incoming arguments). With your change, the padding is counted twice - once
in arg_size and once by the new call to pad_below. Thus, for a char, the
total parameter size is increased by 15 - 7 bytes padding by pad_below and
8 bytes for arg_size. This doesn't work, obviously. I'm not sure how to
fix this without knowing anything about your port. Are you sure that the
problem is in locate_and_pad_parm and not in one of its callers?
Bye
Roman