Subject: Re: Kernels & FP Emulation
To: Bryan Clingman <bac@realtimeweb.com>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 01/13/1998 19:32:47
> I noticed the Makefile in the mac68k/conf directory specifies:
> 
> CPPFLAGS = ... -Dmc68020
> CFLAGS = .... -msoft-float
> 
> If my machine (a IIcx) has a FPU and is a 68030, what does this do?

Makes it run right (the latter one, anyway).

> I built a kernel by removing the -msoft-float and changing the -Dmc68020
> to -Dmc68030, but it was unreliable (invalid instructions on getty, tcsh
> etc).  With just the -Dmc68020 changed back to -Dmc68030, it seems more
> reliable, but there are still problems.
> 
> I'm assuming that the -Dmc68020 is for some #ifdef'ed piece of code and
> can rationalize it, but the -msoft-float confuses me.
> 
> btw,  My config file doesn't include FPU_EMULATE or FPSP.

If the kernel never touches what's in the FP registers, then the interrupt
service routines don't have to bother saving & restoring their contents.

And for the macs, since some machines lack FPU's, imagine what'd happen if
the code to emulate the FPU ended up using FPU instructions!

The main problem is the register saving one. There are key points where
we don't save the FP regs since we're not supposed to touch them. W/o
-msoft-float, the FP regs were magically changing on the user-land programs.

Things should run fine on your machine w/ just -Dmc68030 and -msoft-float.

Take care,

Bill