This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Save/restore PIC register on PA when using builtin_setjmp/longjmp
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: PATCH: Save/restore PIC register on PA when using builtin_setjmp/longjmp
- From: law at redhat dot com
- Date: Sun, 06 May 2001 09:41:58 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <200105051742.NAA08080@hiauly1.hia.nrc.ca>you write:
> The only remaining g++ FAILs that don't have an obvious explanation
> are rethrow[1,2,4,6].C. These failures are probably a design problem
> in the exception code as they also fail under i686 linux with
> -fsjlj-exceptions.
I don't think so. Particularly since they worked with gcc-2.95.2.
> Hopefully, these failures will be fixed when Richard replaces the
> exception code. It it good to see that g++ on the PA is working
> better than on i686 linux when sjlj exceptions are used.
Yes, further debugging of these is best delayed until the new EH code is
installed on the branch.
> The patch uses the same technique to save and restore the pic register
> as is used across calls. It relies on the fact that the save rtx is
> a stack slot and not a register when current_function_has_nonlocal_label
> is defined. I did try a patch where I put the PIC register in the
> jmpbuf with identical results. However, this one is less invasive.
Ok. Thanks. I'd played around with a patch which put it in the jmpbuf too.
While not terribly invasive, it was more invasive than your patch.
I'm not 100% sure if it'll work for pa-linux, but it looks pretty reasonable.
> The patch also fixes a minor problem with builtin_longjmp where I
> noticed that load instructions were being placed into the delay slot
> of the interspace branch after the space register was updated for
> the branch.
Shouldn't be a problem unless the loads were loading a literal out of
$LIT$. But it's best to be sure.
As to testing on the mainline -- I wouldn't worry terribly about it. I suspect
the mainline is pretty broken on the PA right now -- which I consider OK since
our focus should be on the gcc-3.0 branch :-)
> 2001-05-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
>
> * pa.md (interspace_jump): Revise comment.
> (builtin_longjmp): Block initial setup insns from delay slot of
> interspace branch.
> (builtin_setjmp_receiver): New expander to save and restore PIC
> register.
Approved. Please install on the branch and in the mainline sources.
Thanks,
jeff