This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM/Linux soft float update
On Fri, Apr 23, 2004 at 02:01:47PM +0100, Richard Earnshaw wrote:
> On Thu, 2004-04-22 at 17:28, Daniel Jacobowitz wrote:
> > Once upon a time, ARM GNU/Linux used a separate floating point library named
> > libfloat. Phil B. tells me that nobody seems to use it any more, and also
> > nowadays we have Nico's highly optimized software floating point
> > implementation. This patch switches arm-unknown-linux-gnu to use the libgcc
> > floating point routines and not imply -lfloat.
> >
> > OK?
>
> I don't like this: I think it's somewhat misguided. I understand that
> you are trying to work around the inefficiencies of having to emulate
> FPA instructions all the time, but adding support for a 'soft-float'
> linux introduces a new ABI. I think it's important to look at this
> issue in the wider context of the entire ARM-linux ABI.
>
> If arm-linux is going to change its ABI at all (and I think it has to,
> since there are too many things about its existing ABI which don't scale
> to modern ARM core implementations) then I think it has to do so once,
> and in a co-ordinated manner. Ad hoc changes like this just make the
> whole migration process more complicated in the long run.
Yes, it "introduces" a new ABI - well, not really, since the
-msoft-float and --with-float=soft options already exist. So does
-msoft-float on every other target which supports it; there are
powerpc-linux soft float distributions, for instance, for the 8xx
series.
My position has always been that if you specify ABI-changing options to
GCC's configure script you had best know what you're doing with them.
So far we haven't had any troubles there. I'm going to keep using this
patch in any case; not applying it just means I have to keep it in my
local tree when testing :)
The userland I'm testing against is not only soft-float, but also VFP
format, FYI. This isn't a change appropriate for everyone, and I doubt
the greater ARM GNU/Linux community is going to be interested in
supporting a single ABI, especially with more VFP-supporting processors
appearing. Casual GNU/Linux users tend to be fine with emulation, but
embedded developers come to us in desperate need of that extra
performance boost.
> On a technical point. This change puts support functions into libgcc
> which wouldn't match the interfaces that gcc would use if it weren't to
> use the corresponding FPA instructions. That's just wrong.
This is no more or less true than if you build --target=arm-elf. If you
do that, you'll get hardware floating point versions of the soft float
routines in libgcc, except for the hand-written assembly versions,
which will expect soft-float arguments.
I guess all I have in my defense is "that's how every other port does
it". Not the strongest of arguments; I'll keep the patch local and
apply it to my testing trees. Would you accept a patch which added the
functions only for --with-float=soft?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer