gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [mips] fix $gp restore bug

Subject: Re: [mips] fix $gp restore bug
From: "Maciej W. Rozycki"
Date: Tue, 3 Mar 2009 10:47:57 +0000 GMT
On Mon, 2 Mar 2009, Adam Nemet wrote:

> >  Let's face it -- it's not the instruction list which is inadequate.  It
> > is the decision to make $gp call-clobbered for o32 which was suboptimal.
> > There was a reason it got fixed with the advent of the new ABIs (along
> > with a number of other issues).
> 
> AIUI, the problem exists with the new ABIs as well.  You either ensure that
> the GOT pointer is live at each branch pessimizing the code or you need a
> different way of fetching the destination address into a register.

 Well, $gp is call-saved with the new ABIs and given the other eight 
static registers there is little point in clobbering $gp once it has been 
set up in the prologue.  Too much hassle for too little gain IMO.

  MAciej

<Prev in Thread] Current Thread [Next in Thread>