This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mips] fix $gp restore bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]