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: Unrevied patches^3


On Mon, Oct 20, 2003 at 09:43:11AM -0700, Geoff Keating wrote:
> In that case, the right thing to do is this.  In the prologue, you
> have:
> 
> (set (reg $gp) (...)) (REG_EQUAL (symbol_ref ("small_data")))
> [or whatever the symbol is named.]
> 
> Then, in the RTL of the routine, you have
> 
> (set (reg ...)
>  (plus (reg $gp) 
>   (const (minus (symbol_ref ("x"), symbol_ref ("small_data"))))))
> 
> This is what rs6000 does in, I think, -fPIC mode on SVR4.

Yeah, and I'm not particularly fond of it.

I'm more fond of the scheme I used on alpha and ia64 where we don't
expose this nonsense at all until after reload, and after that use
either LO_SUM with $gp, or (plus $gp (high x)), depending.



r~


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