Re: [hatari-devel] Re: FPU update

[ Thread Index | Date Index | More Archives ]

Am 21.01.2017 um 17:47 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.

Attachment: test.diff
Description: Binary data

Mail converted by MHonArc 2.6.19+