This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using mem_attrs to get the tree of a function being called?


On Wed, Apr 30, 2003 at 04:52:08PM +0200, Alexandre Courbot wrote:
> Are mem_attrs not used when dealing with functions?

No.

> If so, is there any good reason why this is so or shall I go ahead
> and try to implement it?

No, there's no good reason for the MEM at all.  If I were 
going to change anything, it'd be removing that silly bit
of history.

On gcc mainline you can get back to the DECL for a direct
function call via SYMBOL_REF_DECL.  There is no way to do
this for indirect function calls.

Normally in these cases the port generates a cookie for
what it needs to know during FUNCTION_ARG.  There's a 
final call to that hook with VOIDmode.  Return a CONST_INT
containing whatever bits you need, and it'll be given to
the call expander, which can then tuck it away somewhere.
See the ARM port for an example of this.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]