This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: newlib and h8300s


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


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