On Thu, Jan 05, 2006 at 01:40:05PM -0800, Ian Lance Taylor wrote:
> > Regarding
> > 
> >     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11135
> > 
> > How much effort would it take to fix this, at least for x86 (32-bit)?
> 
> Not hard.  See the MIPS backend, for example.  Look at how it defines
> PIC_OFFSET_TABLE_REGNUM and how it handles pic_offset_table_rtx.

We already implement this.  Indeed, the MIPS backend copied
it from the x86 backend.  The problem being that it doesn't
take much effort at all to use the three call-clobbered 
registers and prevent the optimization.

What they're looking for is, for functions that don't use
the pic register, to not reserve the pic register so that
it's available for computation.  This is harder.  In theory,
ppc has some scheme for this, where they eliminate the pic
register to itself.  I've never really understood how that's
supposed to work.


r~

Reply via email to