Laurent Vivier <laur...@vivier.eu> writes:
> Le 29/04/2020 à 11:26, Alex Bennée a écrit : >> >> Laurent Vivier <laur...@vivier.eu> writes: >> >>> Le 28/04/2020 à 20:43, Alex Bennée a écrit : >>>> >>>> KONRAD Frederic <frederic.kon...@adacore.com> 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. >> > Is there any HOWTO somewhere? Or should I dig into the code as usual? On your known good HW: ./float_convs > float_convs.ref and copy the file into tests/tcg/m68k and the: run-float_%: float_% $(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<,"$< on $(TARGET_NAME)") $(call conditional-diff-out,$<,$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/$<.ref) should automatically include the diff on the next run. > > Thanks, > Laurent -- Alex Bennée