Re: [hatari-devel] FPU detection, who is wrong?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


> It FRESTORE'd manually created NULL
> frame, FSAVE'd it and checked if saved frame was NULL frame, if not NULL
> (or F-line exception) -> assume no FPU.

The detection code in MiNT is a bit different, but i've seen it already in other programs:

- create NULL frame
- frestore
- fnop
- fsave

Beside from catching line-F exceptions, it then expects an IDLE frame being saved. This works for 030, but not for 040/060, which creates a NULL frame instead. If i insert some other FPU instruction after the fnop, it works as expected. So apparently the fnop is not executed at all.




Toni Wilen <twilen@xxxxxxxxxx> schrieb am 15:49 Dienstag, 17.Februar 2015:


> BTW, while trying out a new version of the detection code i found
> another problem. When i set the CPU/FPU in Hatari to 68040, i get a NULL
> frame instead of a IDLE frame. Looks like the fnop is not executed at
> all (fpu_state in cpu/fpp.c is still 0 when the fsave is executed). When
> i do something like fmove fp0,fp0 before the fsave, everythng is fine. I
> haven't tried the old UAE version, though.


I don't think old UAE FPU emulation emulated NULL state. Originally
FSAVE always stored IDLE frames.

NULL frame emulation was implemented about 2 years ago when I found
first program that required it. It FRESTORE'd manually created NULL
frame, FSAVE'd it and checked if saved frame was NULL frame, if not NULL
(or F-line exception) -> assume no FPU. This strange FPU detection is in
official Amiga Unix (Amix, only compatible with 68030).








Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/