[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] FPU question



On Fri, Feb 05, 1999 at 07:10:30PM +0100, Konrad Kokoszkiewicz wrote:
> > 
> > Correct. I should (again) note that this is a bad thing - MiNT should either
> > provide all the necessary FPU emulation, or leave the vectors alone.
> 
> MiNT steals exception vectors, because exceptions are supposed to generate
> signals rather than draw bombs. There are only two logical solutions:

No. Mint should only those exception vectors which it knows how to handle.
You don't want to get signals for interrupts and other stuff, the same way
that you don't want to get signals for unimplemented LineF traps (which are
usually emulated by the OS).

> 1) softload FPU emulation after MiNT

Not possible in this case - and not very useful, since the emulation will be
in memory twice.

> 2) add FPU emulation to MiNT itself.

possible. Anyone willing to do that?
The emulation code is available from Motorola - however, it is still a bit
of work to get it running flawless (FPU_nnn from Hades does *not* pass the
runtime tests provided by Motorola).

Unless MiNT provides its own FPU emulation ocde, it should simply stay away
from the working one already installed.

> Eventually, MiNT could try to detect, if TOS already installed an FPU
> emulation, and "reinstall" it upon own initialization. Now question: does
> TOS (Milan TOS) mark the installed FPU emulation somehow? Perhaps a _FPU
> cookie value or what?

I guess the emulator should do that - the low word of the _FPU cookie is
used to announce emulation support:

; The low word of the _FPU cookie's value describes software floating point
; which is installed.  Since there isn't any yet, this is somewhat
; nebulous.  However, a zero means there is no software support for line-F
; instructions, and the high bit of the low word means whatever you've got
; is aware of having a 68040, so it will use line-F instructions for those
; functions which are present in that processor.
;
; 	LOW WORD
; 
; 	0000 = no software FPU emulation
; 	other = Atari-assigned software version number.
; 		High bit means S/W is 68040-FPU aware.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen