Patch: fix regression in PPC sibcalls (redone)
Dale Johannesen
dalej@apple.com
Sat Jan 4 02:17:00 GMT 2003
On Friday, January 3, 2003, at 05:58 PM, Geoff Keating wrote:
>
> I'm looking at this patch and Jorn's patch trying to work out what is
> correct. pretend_args_size is defined as this:
>
> /* # bytes the prologue should push and pretend that the caller
> pushed them.
> The prologue must do this, but only if parms can be passed in
> registers. */
>
> So it seems to me that Jorn's patch ought to be correct. If the
> prologue does this, then the epilogue will need to undo it, and so any
> outgoing arguments should start after the extra space.
>
> In the original mail, Dale said:
>
>> It is not right to do the adjustment in that patch when the caller
>> has already allocated the stack space for partially-in-regs params
>
> but in that case (when OUTGOING_REG_PARM_STACK_SPACE is set and
> REG_PARM_STACK_SPACE is nonzero), pretend_args_size should be zero,
> since if the caller has already allocated the space then the prologue
> shouldn't. So I think the real problem is that in assign_parms
> in function.c, current_function_pretend_args_size is set
> unconditionally, but it shouldn't be set in this case.
So this is a lurker that's been in there a while. OK, I'll try a fix
along these lines. Thanks for looking at it.
More information about the Gcc-patches
mailing list