Re: [hatari-devel] Re: FPU update

[ Thread Index | Date Index | More Archives ]

Am 21.01.2017 um 22:08 schrieb Toni Wilen <twilen@xxxxxxxxxx>:

>>>> Attached is screenshot that shows errors, what do they mean? (Is
>>>> it correct or incorrect value or something else?)
>>> FSGLMUL and FSGLDIV error cause most likely is this (which is not 
>>> handled yet):
>>> "The input operand mantissas truncate to single precision before
>>> the multiply operation" (from M68000PRM.pdf)
>>> (How to emulate this correctly?)
>> These SGL functions are quite weird. I wrote some special functions
>> assuming this: - The input values are truncated (not rounded) to
>> single precision mantissa (after normalization, if necessary) - The
>> output value is rounded to single precision mantissa with these
>> exceptions: - Output overflows: Infinity or biggest normal number
>> with extended mantissa - Output severely underflows: Zero or smallest
>> denormalized number with extended mantissa
>> Please try the appended patch, but be aware this is highly
>> experimental. I'll have a look at FNEG and FABS tomorrow. But on
>> first view this can only be caused by missing NaN handling in those
>> functions. Other than this these functions are quite simple.
> I merged it quickly but now all FSGL tests return error, including
> FSGLDIV tests that did pass previously.
> As usual, official documentation is mostly useless.. Perhaps real
> hardware tests are again needed?
Yes, maybe. Or maybe it would help if we knew the input values and what is expected as an output. That might point us to the issue.
I noticed there is a little mistake from merging my previous code. In the function normalizeFloatx80Subnormal there is an extra line at the end of the function, that should have been removed.

Mail converted by MHonArc 2.6.19+