This is the mail archive of the 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]

Re: x86 PIC regressions

On Fri, Sep 04, 1998 at 03:06:19AM -0600, Jeffrey A Law wrote:
> Underneath many of the problems we're seeing on the x86, powerpc, and
> PA (in the past) with PIC are due to reload wanting to put items in
> the constant pool/static store and hoping that the backend will just
> do the right thing.


[ Bizzarely, I can't reproduce the problems I once had here.  In
  that I commented out the reload-specific hackery in mov[sdx]f
  and I still passed the testsuite.  I'm a bit confused by this.

  I'm gonna check in the patch without this hackery -- someone
  pipe up if they locate a test case again.  ]

> If we can stop reload from creating new references into the static
> store or constant pool don't most of these problems go away?

Either that, or teach reload that it might have to do something
more to fix up the problem.  Which actually gets mighty confusing
with, say, the PIC register in a pseudo.

> And isn't the only way we get these references via the handling of
> REG_EQUIV stuff?

I think so.  And if that's the case, there's no need to invent 
any new construct-this-constant-by-parts-on-the-stack sort of
solution.  If we can't reload the constant directly, we ignore
the REG_EQUIV and spill the register in question.

Hum.. this is slightly pessimal on machines with a fixed PIC hard reg
and GOT-relative addressing, like current x86.  Since we can always
load directly from the memory, we just need to frob

	(mem (symbol_ref ""))
	(mem (plus (reg ebx) (unspec [(symbol_ref "")] 7)))

Perhaps if there were a strict_memory_address function that, 
like memory_address, does a machine-specific transform, but
is not allowed to create new pseudos.  Ie if you need a spill
reg, you can't play.


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