------- Comment #2 from daney at gcc dot gnu dot org 2007-06-20 07:11 -------
Created an attachment (id=13739)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13739&action=view)
First patch attempt.
I think this patch fixes this bug. The test case looks better from my
cross-compiler. I will bootstrap it to be sure.
I don't really like the patch that much though. It forces $gp to be loaded in
a nonlocal_goto_receiver, which fixes the bug in cases where $gp is needed. If
$gp is not needed, it would be nice not to force it to be restored.
In vain I tried to mark $gp as clobbered in hope that it would be magically
restored if needed. I guess I need a bit more RTL foo. If there are two
function calls in the nonlocal goto target (two uses of $gp with a clobber
between), the second call has $gp restored. I think there should be a way to
make the first use of $gp to cause $gp to be restored, but I don't know what it
is.
Thanks to Hans-Peter Nilsson for the pointer.
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |daney at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32406