This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: how can RETURN_ADDR_RTX possibly do its work?
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Nathan Sidwell'" <nathan at codesourcery dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 25 May 2004 15:30:12 +0100
- Subject: 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....