This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k pic bug
- To: John Marshall <john_w_marshall at palm dot com>
- Subject: Re: m68k pic bug
- From: Andreas Schwab <schwab at suse dot de>
- Date: 18 Oct 1999 19:44:22 +0200
- Cc: egcs at egcs dot cygnus dot com (egcs)
- References: <199910181554.IAA12398@kovalevskaya.palm.com>
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