Mark,
> Kai Tietz wrote:
>
> >> Kai, why is your change making OUTGOING_REG_PARM_STACK_SPACE accept a
> >> FUNCTION_DECL, rather than a FUNCTION_TYPE? I'd think that all
> >> calling-convention predicates ought to be looking at the type to
support
> >> calling through function pointers?
> >
> > This macro is used also in builtin's and libcalls subject where the
> > FUNC_DECL is a null reference. Also in most places the FUNC_DECL is
> > allready present. To avoid duplicate code to check and get the
FUNC_TYPE
> > by FUNC_DECL, I choose to pass the function declaration.
>
> I'm sorry -- that doesn't really answer the question I was trying to
> ask. To be clear, if we're calling through a function pointer, we still
> need to be able to do the right thing, and in that case we don't have a
> FUNCTION_DECL. So, I don't understand how you can have a macro to
> control the calling convention that accepts a FUNCTION_DECL; I would
> think it would have to accept a FUNCTION_TYPE.
Sorry, I think I missed your question. To make the macro
OUTGOING_REG_PARM_STACK_SPACE accepting a FUNCTION_DECL, there is no
special reason for it. I deceided this to make it accepting a
FUNCTION_DECL to avoid the fndecl to fntype conversion in middle-backend.
In some cases there is no fntype nor a valid fndecl and (a NULL value),
but there is the FUNCTION_DECL type allready present, therefore I choose
the FUNCTION_DECL type instead of the FUNCTION_TYPE. I think, I used it to
be according to the REG_PARM_STACK_SPACE macro. If this is a serious
problem, of course I can move this to a FUNCTION_TYPE. Are there some
special needs to have here FUNCTION_TYPE ?
Cheers,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer:
Ulrike Döhler, Manuela Kluger