[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 10:48:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
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.
https://github.com/vivier/m68k-testfloat
https://github.com/vivier/m68k-softfloat
I also used the gcc and libc testsuite to detect problems but this was a
very slow process...
I have also ported RISU to m68k, but I didn't add FPU test in it (does
it support FPU test?).
Thanks,
Laurent
[PATCH 1/2] softfloat: m68k: infinity is a valid encoding, KONRAD Frederic, 2020/04/28
Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding, Laurent Vivier, 2020/04/29