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: how can RETURN_ADDR_RTX possibly do its work?


> -----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....
 



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