This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ppc __builtin_eh_return with -mminimal-toc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 12 Apr 2003 18:08:48 -0400
- Subject: Re: [PATCH] Fix ppc __builtin_eh_return with -mminimal-toc
- References: <jakub@redhat.com> <200304122124.RAA24070@makai.watson.ibm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Apr 12, 2003 at 05:24:39PM -0400, David Edelsohn wrote:
> >>>>> Jakub Jelinek writes:
>
> Jakub> It of couse needs to be restored, but there should be no need to
> Jakub> mention it in EPILOGUE_USES macro.
> Jakub> r30, unlike r2, is a call saved register, and as such its value is
> Jakub> restored with all the other call saved registers from unwind context
> Jakub> in rs6000_emit_epilogue.
>
> Okay.
>
> Should EPILOGUE_USES also return true for r2 if eABI (sdata2) or
> PPC32 Linux TLS?
For PPC32 certainly not, %r2 there needs to stay untouched, unwinding from
one thread into a different one is impossible.
For eABI, I really don't know, but if that is needed, there would have to
be some code to actually restore that register written first (like for AIX
ABI is in rs6000_emit_eh_toc_restore ()).
I tried to find where is the code which uses r2 in gcc for eABI and couldn't
find one.
Jakub