Mail Archives: djgpp-workers/1999/06/29/12:54:46
On Tue, Jun 29, 1999 at 12:03:31PM -0300, salvador wrote:
> DJ Delorie wrote:
>
> > > I have new few days to play with the regparmized libc code, so I
> > > would like to know your opinions and if it does have chance to get
> > > into official distribution.
> >
> > It has little chance of replacing the default libraries, simply
> > because every third-party toolkit out there would have to be
> > recompiled to match it.
>
> No if you specify the calling convention in the headers, which BTW should be
> specified anyways!
> I think all libc headers should clearly declare the calling convention used to
> compile libc. That's common practice in Borland headers. I think they must tell
> the functions are currently compiled with regparm=0 and C calling convention.
I was thinking about this solution for a while and I believe it will not work.
Except the fact that gcc is buggy about calling the memset and similar half-builtins,
you will get problems with the libgcc.a functions. They are called by default
calling convention (so they will be called in different conventions from libs
and from programs).
Also functions using callbacks (such as qsort) will require you to write those
attributes to callbacks.
I believe that multiple libraries is the best solution. Djgpp libraries are
not so long and the register version can come in separate file.
In lib directory you will just have r0 and r3 subdirectiores with the
libraries.
So I am happy with the fact, that necesary changes (they will not be so large)
can go to the sources distribution.
Honza
>
> SET
>
> --
> Salvador Eduardo Tropea (SET). (Electronics Engineer)
> Visit my home page: http://welcome.to/SetSoft or
> http://www.geocities.com/SiliconValley/Vista/6552/
> Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
> set AT ieee DOT org set-soft AT bigfoot DOT com
> Address: Curapaligue 2124, Caseros, 3 de Febrero
> Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013
>
>
- Raw text -