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

Re: m68k pic bug


John Marshall <john_w_marshall@palm.com> writes:

|> >         * config/m68k/m68k.h (INITIAL_FRAME_POINTER_OFFSET): Add one word
|> >         if the pic register is used.
|> [...]
|> > @@ -1242,6 +1242,8 @@
|> >    for (regno = 0; regno < 16; regno++)                         \
|> >      if (regs_ever_live[regno] && ! call_used_regs[regno])      \
|> >        offset += 4;                                             \
|> > +  if (flag_pic && current_function_uses_pic_offset_table)      \
|> > +    offset += 4;                                               \
|> 
|> On PalmOS, the PIC register is never to be modified by programs and is
|> fixed, so we don't want to save and restore it on function entry/exit.
|> This patch, and the earlier similar ones to output_function_prologue,
|> output_function_epilogue, and use_return_insn, break that.
|> 
|> But I'm sure there are good reasons why you're separating out the PIC
|> register like this :-).  Would it be appropriate to add
|> 
|> 	&& ! fixed_regs[PIC_OFFSET_TABLE_REGNUM]
|> 
|> to your patch(es)?  That would solve PalmOS's problem.

The pic register is always fixed if -fpic.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


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