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]
Other format: [Raw text]

Re: [PATH] PR 5126, fix for m68k PIC optimization bug

Richard Henderson <> writes:

|> On Thu, Dec 27, 2001 at 10:06:16PM +0100, Andreas Schwab wrote:
|> > Not making the pic register a fixed register does not work, IIRC this is
|> > because references to the pic register can be created during reload when a
|> > CONST_DOUBLE needs to be moved to the constant pool, and this is the first
|> > time a pic reference is needed.
|> Correct, but I thought regs_ever_live was kept up to date until
|> reload, which would have the advantage that if all references 
|> to the pic register get optimized away early, you don't load the
|> pic register, unlike with current_function_uses_pic_offset_table.
|> You would have to handle updating regs_ever_live during reload 
|> special, but I'd think it possible.
|> OTOH, x86 continues to use it's own private variable, like
|> current_function_uses_pic_offset_table, so I don't know if
|> there's just something that I'm forgetting.

x86 PIC support is different, the pic register is needed even for calling
a function (and it is hard-coded in the PLT).  On m68k you only need a
register for indexing the GOT, and that can even be an arbitrary address
register (actually you don't really need a register, but it's more
efficient this way).  Note, I'm only talking about SVR4-style PIC, I don't
know about other PIC implementations.


Andreas Schwab                                  "And now for something				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

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