Subject: Re: soft float and binary compatibility
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: TAKEMURA Shin <takemura@netbsd.org>
List: port-hpcmips
Date: 03/04/2000 17:06:50
----- Original Message -----
From: "Jason Thorpe" <thorpej@nas.nasa.gov>
To: "TAKEMURA Shin" <takemura@netbsd.org>
Cc: "NetBSD port-hpcmips" <port-hpcmips@netbsd.org>; "NetBSD port-mips"
<port-mips@netbsd.org>
Sent: Monday, February 28, 2000 5:17 AM
Subject: Re: soft float and binary compatibility


>  > I want to delete SOFTFLOAT option to get compatibility with pmax and
>  > arc.
>
> No objection from me... but it would be nice to know how much of a
> performance difference there really is.


I compiled pkg/benchmarks/whetstone/whetstone.c and run on NEC
Mobile Gear MC/R530, VR4121 168MHz. SOFTFLOAT binary is 300%
faster than HARDFLOAT binary. But if you use dynamiclinked
SOFTFLOAT libraries, the performance is terrible.

Anyway I intend to delete SOFTFLOAT option.

cc -O2 -msoft-float whetsonte.c -lm:
Loops:  100, Iterations: 1, Duration:  77.849998 sec. 128.5 KIPS
Loops:  200, Iterations: 1, Duration:  85.669998 sec. 233.5 KIPS
Loops: 1000, Iterations: 1, Duration: 427.890015 sec. 233.7 KIPS

cc -O2 -msoft-float -static whetsonte.c -lm:
Loops:  100, Iterations: 1, Duration:  11.330000 sec. 882.6 KIPS
Loops:  200, Iterations: 1, Duration:  22.379999 sec. 893.7 KIPS
Loops: 1000, Iterations: 1, Duration: 100.230003 sec. 997.7 KIPS

cc -O2 -msoft-float whetsonte.c libc.a -lm :
Loops:  100, Iterations: 1, Duration:  12.110000 sec. 825.8 KIPS
Loops:  200, Iterations: 1, Duration:  24.290001 sec. 823.4 KIPS
Loops: 1000, Iterations: 1, Duration: 108.550003 sec. 921.2 KIPS

cc -O2 -mhard-float whetsonte.c -lm:
Loops:  100, Iterations: 1, Duration:  32.590000 sec. 306.8 KIPS
Loops:  200, Iterations: 1, Duration:  64.500000 sec. 310.1 KIPS
Loops: 1000, Iterations: 1, Duration: 297.799988 sec. 335.8 KIPS

cc -O2 -mhard-float -static whetsonte.c -lm:
Loops:  100, Iterations: 1, Duration:  32.590000 sec. 306.8 KIPS
Loops:  200, Iterations: 1, Duration:  64.510002 sec. 310.0 KIPS
Loops: 1000, Iterations: 1, Duration: 297.750000 sec. 335.9 KIPS

> Though, not many thing in userland really use the FPU that much ... except
> the compiler may do bad things like emit floating point ops for inlined
> memcpy's, etc.  That would be a major lose.

Does MIPS GCC really generate such code ?

Takemura