qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding


From: Laurent Vivier
Subject: Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding
Date: Wed, 29 Apr 2020 16:27:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Le 29/04/2020 à 11:26, Alex Bennée a écrit :
> 
> Laurent Vivier <address@hidden> writes:
> 
>> Le 28/04/2020 à 20:43, Alex Bennée a écrit :
>>>
>>> KONRAD Frederic <address@hidden> writes:
>>>
>>>> The MC68881 say about infinities (3.2.4):
>>>>
>>>> "*For the extended precision format, the most significant bit of the
>>>> mantissa (the integer bit) is a don't care."
>>>>
>>>> https://www.nxp.com/docs/en/reference-manual/MC68881UM.pdf
>>>>
>>>> The m68k extended format is implemented with the floatx80 and
>>>> floatx80_invalid_encoding currently treats 0x7fff00000000000000000000 as
>>>> an invalid encoding.  This patch fixes floatx80_invalid_encoding so it
>>>> accepts that the most significant bit of the mantissa can be 0.
>>>>
>>>> This bug can be revealed with the following code which pushes extended
>>>> infinity on the stack as a double and then reloads it as a double.  It
>>>> should normally be converted and read back as infinity and is currently
>>>> read back as nan:
>>>
>>> Do you have any real HW on which you could record some .ref files for
>>> the various multiarch float tests we have (float_convs/float_madds)?
>>> Does this different of invalid encoding show up when you add them?
>>
>> On my side, in the past when I started to implement m68k FPU, I used
>> TestFloat and SoftFloat I have ported to m68k and I compare the result
>> in QEMU and in a Quadra 800.
> 
> Surely TestFloat and SoftFloat is all emulation though?
> 
> Anyway if you have a Quadra 800 running Linux could you generate some
> .ref files for the float_convs and float_madds test cases. The binaries
> are static so you should just be able to copy them and run.
> 
>

Here are the files I have generated on Q800.

Thanks,
Laurent

Attachment: float_madds.ref.gz
Description: application/gzip

Attachment: float_convs.ref.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]