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: [PATH] PR 5126, fix for m68k PIC optimization bug


On Sat, Dec 15, 2001 at 04:08:26PM -0500, Craig Rodrigues wrote:
> -  if (flag_pic && current_function_uses_pic_offset_table)
> +  if (flag_pic && current_function_uses_pic_offset_table &&
> +      regs_ever_live[PIC_OFFSET_TABLE_REGNUM])

This isn't correct.  References to the pic register may be
added during reload, which will not update regs_ever_live.

We need to either obey current_function_uses_pic_offset_table
everywhere (meaning m68k_output_function_prologue must save
this register above), or we must take special care to update
regs_ever_live during reload in legitimize_pic_address.  If we
do the later, it is likely that current_function_uses_pic_offset_table
is obsolete.


r~


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