how can RETURN_ADDR_RTX possibly do its work?

Dave Korn dk@artimi.com
Tue May 25 14:31:00 GMT 2004


> -----Original Message-----
> From: Nathan Sidwell
> Sent: 25 May 2004 14:40
> To: Dave Korn
> Cc: gcc
> Subject: Re: how can RETURN_ADDR_RTX possibly do its work?

> I found that,
> 
> XXX.c
> /* The return address of the current function.  */
> 
> rtx
> XXX_return_addr (void)
> {
>    return get_hard_reg_initial_val (Pmode, LINK_REGNUM);
> }
> 
> XXX.h
> #define RETURN_ADDR_RTX(count,frame) \
> 	((count) ? NULL_RTX : XXX_return_addr ())
> 
> did the trick. I stole it from one of the other config files, 
> but I forget
> which.
 

  Thanks Nathan, that looks like just what I was looking for.  Guess I
should have checked another few ports before I wrote!

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....
 




More information about the Gcc mailing list