Subject: Re: NetBSD in Centris 610
To: None <port-mac68k@netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: port-mac68k
Date: 02/19/2003 16:44:04
On Wed, Feb 19, 2003 at 09:24:08AM -0500, gabriel rosenkoetter wrote:

> How's the performance relative to an 030 using NetBSD's fpu emulation?

that's a good question...  gcc's floating point libs are complete, but
in my experience are very slow.  it's possible NetBSD's emulation is
better, but as previously mentioned, you get a per-instruction trap
penalty.

> (My guess would be pretty good, provided gcc can optimize m68k
> decently these days;

in the words of Nathan: "excuse me while I cackle maniacally." I think
it's gotten a little better with gcc 3.2.x, but it's still fairly easy
to throw monkey wrenches in gcc's optimizations.  I'm not sure if it's
an inherent problem or if the gcc machine description of m68k family
simply isn't complete.  it'd be nice to look at one of these days.

> I can dig out an LC III to do some benchmarking on the 030 side, if no
> one else has one handy.)

we should check:

1) cpu with FPU and processor-specific flags (IE -m68030)
2) cpu (with or without FPU), NetBSD generic flags, and kernel FPU
3) cpu (with or without FPU), NetBSD-generic flags, -msoft-float

the difference between 2 and 3 is the interesting part.  #1 just gives
us the top limit.  ;)

> Is there a reliable way we can detect an LC040? Do we really just want
> to do this instead of bothering to emulate fpu all the time for mac68k
> in an fpu's absence, or are there negative consequences (say, for math
> applications)?

the whole point of having kernel FPU emulation is that we can run the
same binaries on all m68k hosts regardless of FPU availability.  only
those without FPU pay a speed penalty.  if we compile everything with
-msoft-float, the binaries will still be able to run everywhere, but now
those _with_ FPU will pay the speed penalty.

however, for those with buggy FPU emulation (LC040 users) there really
isn't any choice other than running -msoft-float userland.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
    "i'm convinced that the cray cabinet has an outlet for plugging in
    welding attachments."  --  Skeezics Boondoggle, on the cray CS6400