This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "small data" in m68k gcc?
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Gunther Nikl <gni at gecko dot de>
- Cc: colin-gcc at horizon dot com, gcc at gcc dot gnu dot org
- Date: Tue, 14 Oct 2003 20:08:07 +0200
- Subject: Re: "small data" in m68k gcc?
- Organization: Develer S.r.l.
- References: <20031012214902.2016.qmail@science.horizon.com> <200310130113.55072.bernie@develer.com> <20031014135942.GA17758@lorien.int.gecko.de>
Gunther Nikl wrote:
This has been quite common practice on the Amiga to generate residentable
programs and reduce code and relocs size. Actually, the Amiga uses
A4-relative addressing because A5 is used as a frame pointer and A6 is
reserved for calling shared library functions through a jump table.
Correct. The AmigaOS/m68k patches add two additional pic modes (word
and long sized) and handle these modes at those places where they work
differently to the normal pic/PIC modes. These mode do only affect data,
not function calls.
I'd be interested in having that code on the ColdFire too. It's
an opportunity for getting rid of all relocations and generating
smaller binaries.
But I'm afraid most uClinux binaries linked against uClibc
wouldn't fit into 64KB. And if you go for dynamic libraries,
then you need that ID_SHARED_LIBRARY mess :-(
On the Amiga, you'd use the "__loadds" function attribute for callbacks
and softints.
__saveds
Yes, you already know about my memory problems :-)
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html