This is the mail archive of the
mailing list for the GCC project.
Re: x86 PIC regressions
- To: law at cygnus dot com, Richard Henderson <rth at cygnus dot com>
- Subject: Re: x86 PIC regressions
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 4 Sep 1998 10:56:37 -0700
- Cc: Robert Lipe <robertl at dgii dot com>, "H.J. Lu" <hjl at lucon dot org>, egcs at cygnus dot com, egcs-patches at cygnus dot com
- References: <19980903162501.A32242@dot.cygnus.com> <email@example.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
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.