Subject: Re: SparcStation with no FPU and NetBSD-2.0
To: Michael Kukat <michael@unixiron.org>
From: Bruce O'Neel <edoneel@sdf.lonestar.org>
List: port-sparc
Date: 03/02/2005 10:58:12
Hi,

On Wed, Mar 02, 2005 at 08:42:53AM +0100, Michael Kukat wrote:
> Hallo,
> 
> i got some nice piece of hardware yesterday, a Synoptics LattisNet
> Concentrator 3030 with Network Control Engine 3040, which is some OPUStation
> Personal Mainframe 5000, a SparcStation1 clone. Booting NetBSD works fine, but
> some commands give Floating Point Exceptions due to missing FPU (newfs is one
> of those, which really is a problem :)
> 
> So some questions here:
> 
> Is it possible to run NetBSD 2.0 without FPU on this box?

I've done exactly that with the mac68k port.  You can get a tar file which 
expands overtop of 2.0 at:

ftp://ftp.ziaspace.com/pub/NetBSD/m68k/NetBSD-2.0-mac68ksoftfloat/softfloat-20040930-2.0.tar.gz


> As i have seen, FPU emulation is not yet done (and maybe never will), is this
> true?
> Did anyone try to build a complete 2.0 with -mno-fpu to gcc? This would be the
> next try.

Basically all that happens for the mac68k changes are:

-msoft-float is passed to gcc

and

all the softfloat routines are just added to libc

Probably the simpliest way to start would be just to set 

MKSOFTFLOAT=yes

before a build and see what falls over, lather rinse repeat until it builds.

Once that is done the two programs which seem to cover large numbers of cases
are

ls -l

and 

top

If both of those look reasonable then it's probably ok and ready for further
testing.  If top doesnt' look ok then libm has fpu instruction in it.  From a
quick look at a source tree it doesn't seem that libm has sparc specific 
assembly so that will probably be ok.

Libc on the other hand in src/lib/libc/arch/sparc/gen has a couple of f*.S
files so those may have to be coded around.

Good luck and keep us informed!

BTW, the above patch tar file is not needed for current since the changes
have been included.  That said, it's easier to see the changes in 2.0.

cheers

bruce

-- 
edoneel@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org