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




Andreas Schwab <schwab@suse.de> writes:
> John Marshall <john_w_marshall@palm.com> writes:
>|>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.

Good point -- so of course it wouldn't be appropriate.

Oh.  I remember now (*blush*).  You save/restore the pic register because
you then initialise it in the prologue to point to the GOT.  But on PalmOS
there is no GOT, just a register fixed by the OS (think Macintosh A5-world),
so we hacked around that initialisation.  So I can continue to hack around
this too.

Hmmm... there must be a better way.  Are there other ports that do PIC
without a GOT that I should look at for ideas?  I'll just go away and
think about it some more now...

Thanks,
John



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