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]
Other format: [Raw text]

Re: Register-relative data addressing, especially m68k.


On Wed, Feb 25, 2004 at 08:12:25AM -0700, Ray Whitmer wrote:
> I have been asked to do a quick project for a company making whatever
> modifications are necessary in GCC to get register-relative addressing
> of the global variables to work, preferably using A5, but that could be
> modified if necessary.

  Changing the compiler isn't enough. You also need modified binutils
  which support this relative addressing model.

> I need simple, direct access to global variables relative to a base
> register such as A5.

  With word-sized indexing your are limited to 64k of combined data+bss.
  With the 68020+ its possible to use longword indexing.

> I have reviewed the palm and amigaos code variants which support this sort
> of model, but it does not seem reasonable to use these variants, because
> they have never been submitted back into the main code base and because they
> contain lots of other modifications not relevant and even harmful to our
> efforts, which would require us to have a significant derivitive of an
> detached derivitive.

  It should be fairly easy to extract the required parts.

>     a.  Is there any work in progress towards supporting the -baserel sort of
>         model in GCC, especially in m68k, but also on other platforms (I have
>         seen this sort of model used on Alpha, etc.) -- even an outstanding
>         enhancement request might be useful to review, as I have found plenty
>         of requests for this sort of feature, but not in bugzilla.

  Well, I am planning to contribute it as part of the m68k-amigaos port.
  I don't know if its possible to make it a truly generic feature. There
  are problems with the baserel feature of m68k-amigaos which are either
  bugs in the port or generic bugs.

>     c.  Am I right in considering the palm and amigaos enhancements bad
>         examples because they have carried on in parallel for so many years
>         with no incorporation into the base (if there had been, I might not be
>         needing to do much at this point).

  Contributing to GCC isn't all that easy. It needs time and patience.
  There had been attempts to contribute m68k-amigaos but it never happened.

  Gunther


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