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

Re: [MiNT] FPU question



On Fri, Feb 05, 1999 at 06:50:54PM +0000, Jo Even Skarstein wrote:
> 
> Atleast the standard PureC floating-point library does this directly. The
> same goes for the HiSoft-libs (HiSoft basic, Lattice C) I've seen.

Correct. The memory mapped access is not the fastest anyway, and a LineF
emulation trap will slow it down furthermore.

LineF emulation code *does* exist - one was published in the german magacint
"c't" some years ago, however, I am not aware of a widespread use of that
method.

> I don't think this is the case, since no TOS-version AFAIK contains such
> a handler. The normal way to access a memory-mapped FPU is to access it's

Right.

> It might be possible to emulate a real co-processor even on 68000 by hooking
> into exception vector 4 (illegal instruction), but again, I don't think
> something like this exists.

No. Obviously, you hook into the LineF trap vector - that's what it was
supposed to be used for (although TOS used it for its own purposes up to
1.02, IIRC). Any FPU instruction will cause a LineF trap on a 68000, and the
trap handler can then do what is necessary to either emulate the FPU in
software, or pass it to a memory-mapped FPU.

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