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: [m68k] PIC fixes


On Tuesday 20 December 2005 22:01, Aaron J. Grier wrote:
> On Tue, Dec 20, 2005 at 09:43:14PM +0000, Paul Brook wrote:
> > This is a followup for a patch originally posted by Dan some time ago,
> > with the two changes requested by Bernardo.
> >
> > http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01281.html
> >
> > This is a regression where gcc tries to generate bsr.l for pic code on
> > targets that don't support bsr.l.
> >
> > There was some discussion about whether -fpic should use bsr.w. IIUC
> > the conclusion was that even though text/data are <64k, the GOT may
> > still be a long way from .text. If people want a really-small model it
> > should be implemented as a separate option.
>
> according to my reference manual, 68030 and 68040 can also do 32bit
> displacements, so checking only TARGET_68020 is not sufficient.

TARGET_68020 is true for all 680x0 cores where x > 2.

> if USE_GAS is enabled, could jbsr be generated, and let gas figure out
> if the displacement will fit into a word or byte?

IIUC jbsr turns an out of range relative branch into an absolute jump. We're 
generating PIC code, so this isn't an option.

Paul


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