Re: [hatari-devel] Beams TT demo FPU warnings

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


Hi,

On 08/02/2017 07:37 PM, Toni Wilen wrote:
It would be good to have a test program reporting all the possible
FPU constant values. People owning TT machines could then run it
and report the values they get from their 68882 FPUs, so that we
can see whether the mask sets actually differed in reality.  Or
just add one of those sets to Hatari.

I dumped 68882 contents and most undocumented fields are zeros.
68881 output is also needed (I only have 68882s).

TTs have builtin 68882, so that's enough.  Other Atari machines
didn't include FPU so they could have either model (if any).


This does not match
documentation ("constants useful only to the on-chip microcode
routines"), so perhaps 68881 has more non-zero values?

According to spec text, only for M68040FPSP non-specified index
values could be expected to be zeros.


This is what 68882 returns

Nicolas, would it make sense to include these to Hatari?


(Using dump program that someone made ages
ago, I don't remember what < or > mean)

Those values are for different variants of irrational numbers
or very large numbers which cannot be represented exactly by
floating point.  I assume < & > just mean in which direction
the constant (marginally) differs from the real value.


0   $00 < 0x40000000C90FDAA22168C235 (3.14159)
1   $01   0x40010000FE00068200000000 (7.9375)
2   $02   0x40010000FFC0050380000000 (7.99219)
3   $03   0x200000007FFFFFFF00000000 (NaN0.000000)
4   $04   0x00000000FFFFFFFFFFFFFFFF (0)
5   $05   0x3C000000FFFFFFFFFFFFF800 (2.22507e-308)
6   $06   0x3F800000FFFFFF0000000000 (1.17549e-38)
7   $07   0x00010000F65D8D9C00000000 (NaN0.000000)
8   $08   0x7FFF0000401E000000000000 (NaN0.000000)
9   $09   0x43F30000E000000000000000 (7.68057e+304)
10  $0A   0x40720000C000000000000000 (6.23076e+34)
11  $0B > 0x3FFD00009A209A84FBCFF798 (0.30103)
12  $0C > 0x40000000ADF85458A2BB4A9A (2.71828)
13  $0D < 0x3FFF0000B8AA3B295C17F0BC (1.4427)
14  $0E   0x3FFD0000DE5BD8A937287195 (0.434294)
15  $0F   0x000000000000000000000000 (0)
16  $10   0x000000000000000000000000 (0)
17  $11   0x000000000000000000000000 (0)
18  $12   0x000000000000000000000000 (0)
19  $13   0x000000000000000000000000 (0)
20  $14   0x000000000000000000000000 (0)
21  $15   0x000000000000000000000000 (0)
22  $16   0x000000000000000000000000 (0)
23  $17   0x000000000000000000000000 (0)
24  $18   0x000000000000000000000000 (0)
25  $19   0x000000000000000000000000 (0)
26  $1A   0x000000000000000000000000 (0)
27  $1B   0x000000000000000000000000 (0)
28  $1C   0x000000000000000000000000 (0)
29  $1D   0x000000000000000000000000 (0)
30  $1E   0x000000000000000000000000 (0)
31  $1F   0x000000000000000000000000 (0)
32  $20   0x000000000000000000000000 (0)
33  $21   0x000000000000000000000000 (0)
34  $22   0x000000000000000000000000 (0)
35  $23   0x000000000000000000000000 (0)
36  $24   0x000000000000000000000000 (0)
37  $25   0x000000000000000000000000 (0)
38  $26   0x000000000000000000000000 (0)
39  $27   0x000000000000000000000000 (0)
40  $28   0x000000000000000000000000 (0)
41  $29   0x000000000000000000000000 (0)
42  $2A   0x000000000000000000000000 (0)
43  $2B   0x000000000000000000000000 (0)
44  $2C   0x000000000000000000000000 (0)
45  $2D   0x000000000000000000000000 (0)
46  $2E   0x000000000000000000000000 (0)
47  $2F   0x000000000000000000000000 (0)
48  $30 < 0x3FFE0000B17217F7D1CF79AC (0.693147)
49  $31 < 0x40000000935D8DDDAAA8AC17 (2.30259)
50  $32   0x3FFF00008000000000000000 (1)
51  $33   0x40020000A000000000000000 (10)
52  $34   0x40050000C800000000000000 (100)
53  $35   0x400C00009C40000000000000 (10000)
54  $36   0x40190000BEBC200000000000 (1e+08)
55  $37   0x403400008E1BC9BF04000000 (1e+16)
56  $38 < 0x406900009DC5ADA82B70B59E (1e+32)
57  $39 > 0x40D30000C2781F49FFCFA6D5 (1e+64)
58  $3A < 0x41A8000093BA47C980E98CE0 (1e+128)
59  $3B < 0x43510000AA7EEBFB9DF9DE8E (1e+256)
60  $3C < 0x46A30000E319A0AEA60E91C7 (Inf)
61  $3D > 0x4D480000C976758681750C17 (Inf)
62  $3E < 0x5A9200009E8B3B5DC53D5DE5 (Inf)
63  $3F < 0x75250000C46052028A20979B (Inf)

(64 - 127 is same as 0 to 63 so mask should be 0x3f, not 0x7f. Unless
68881 works differently)

The lowest 7 bits in the instruction are for ROM index, so
I think the mask in WinAUE code is correct.  Emulator could
map the higher values to 0 though.


	- Eero



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