-msoft-float

Nick Burrett nick at dsvr.net
Tue Jun 5 09:00:21 PDT 2001


David Boddie <davidb at mcs.st-and.ac.uk> writes:

> On 5 Jun 2001, Nick Burrett wrote:
> 
> > David Boddie <davidb at mcs.st-and.ac.uk> writes:
> > 
> > > I am interested in using the -msoft-float switch with gcc, but the
> > > "gccuser" document indicates that this requires a suitable library to be 
> > > present, and that the libgcc library needs to be recompiled using this
> > > option.
> > > 
> > > Does anyone know if it is possible to create RISC OS binaries with this
> > > option? Is there a pre-existing set of libraries which are suitable for
> > > this task?
> > 
> > It is possible to do this, but it has never been fully tested.  However,
> > I don't see the advantage of doing this, since code size will be bigger
> > and the software floating point libraries are much slower than the FPE.
> 
> Can the latest version of gcc for RISC OS manage this?

It used to, but I turned it off. I decided it was pointless since UnixLib,
the SharedClibrary and various RISC OS modules use FP instructions.

> Is there a pre-compiled libgcc available from anywhere or will I have to
> build my own?

One needs to fix a few files in GCC and it's Makefiles to get this working
again.  It'd probably take an hour.

> If I can get this up and running then I can compare soft-float performance
> against the FPE for my application and attempt to optimize it as required.

The last time I benchmarked it (something like 4 or 5 years ago) soft-FP
performance was approx. 3-3.5 times slower than the FPE. You would need to
write a completely new implementation of the FP-library in order to gain
any significant speed advantage.

I can enable support in the CVS tree, if you like. I haven't tested it for
so long, I'm not sure it will actually work though.


Nick.



More information about the gcc mailing list