Subject: Re: -msoft-quad-float and sparc64
To: Martin Husemann <martin@duskware.de>
From: Andrey Petrov <petrov@netbsd.org>
List: port-sparc64
Date: 10/29/2001 14:08:06
On Sat, Oct 27, 2001 at 01:55:05PM +0200, Martin Husemann wrote:
> > and used gcc testsuite for that. Their floating tests passed but:
> > 	 -mquad-soft-float is needed because of a problem in our fpu emiulation
> > code
> 
> Do I read this correctly: provided we would have a working fpu emulation for
> quad floats, gcc and the code generated by it would just work? (There have
> been suspicions that this is the real cause of the problem, but as far as 
> I know nobody could prove or disprove it yet)

Partially yes, I'd say you'll be better off having correct fpu emulation,
the simple patch I've sent eliminates problem in vmstat and awk. I also
tried regress/../softfloat/testfloat and that helped there as well.
But when compiler emits incorrect code fpu emilation doesn't help
and that happens especially when any floating point is involved.
gcc-current seems better in this case but last time I tried it
the kernel built by it didn't start.

wrt fpu emulation: OpenBSD reworked that code and it seems correct,
I tried it on my regular set(vmstat, emacs, testfloat). It makes sense
to use it.

> 
> Furthermore, you have a testsuite that exhibits the problems in our fpu
> emulation?

fpu emulation testsuite looks like a large piece of work. I used gcc's
testsuite and testfloat and it can be used but it doesn't count as
fpu emulation testsuite.

> 
> Sounds like we should go fix the emulation instead of the gcc defaults...

I'd say both, plus gcc fix to avoid quad-float when it's not needed
(like unsigned long->double conversion).

	Andrey