This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [mips] fix $gp restore bug
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, rdsandiford at googlemail dot com
- Date: Tue, 03 Feb 2009 07:33:16 +0000
- Subject: Re: [mips] fix $gp restore bug
- References: <49870BD7.8050707@codesourcery.com> <87iqnswrzu.fsf@firetop.home>
Richard Sandiford wrote:
> Hmm. Let me think about this one a bit. Although I agree your patch
> fixes the particular problem you found, I think there's another,
> related, problem: because the use of $gp is implicit, it isn't enough
> on its own to stop the optimisers from deleting the $gp restore insn.
good point. IIUC the only case that could happen would be a (huge) function
that accessed no (other) global state and only called functions via function
pointers (that were passed in as argument). Or is the optimizer able to defer
$gp restore to a later point such that it's available by the time an instruction
explicitly refers to it?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery