This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: newlib and h8300s
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: George Gallant <george dot gallant at coredgenetworks dot com>
- Cc: 'Jeff Johnston' <jjohnstn at redhat dot com>, newlib at sourceware dot org
- Date: Thu, 16 Nov 2006 21:01:58 +0000
- Subject: Re: newlib and h8300s
- References: <000f01c708f8$89951930$8301a8c0@CENTCGG> <455CC752.1040601@portugalmail.pt>
Pedro Alves wrote:
Hi all,
George Gallant wrote:
Jeff,
The problem is the "C" functions are generated with parameters passed on
the stack while the "S" functions use registers er0-er3. The default
4.1.1 compiler is stack based so the half dozen "S" function calls fail.
Adding the "-mquickcall" makes my app work with the "S" functions and
fail
with the "C" functions.
My current solution is to generate newlib with "CFLAGS=-mquickcall".
Another
solution (perhaps better) would be to make the default compiler be
QUICKCALL. As we no not need leading underscores and a compiler tends
to be
used for a long time, compiler mods are ok.
There is gcc PR about this:
http://sources.redhat.com/ml/newlib/2006/msg00152.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24826
Even gdb only supports quickcall, this should really be fixed on the
gcc side.
And it has already been fixed :)
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00861.html
Someone should close that PR.
Cheers,
Pedro Alves