All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Laurent Vivier <laurent@vivier.eu>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	KONRAD Frederic <frederic.konrad@adacore.com>,
	philmd@redhat.com, qemu-devel@nongnu.org,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding
Date: Wed, 29 Apr 2020 11:22:56 +0100	[thread overview]
Message-ID: <874kt2lhfj.fsf@linaro.org> (raw)
In-Reply-To: <b6a2a382-6124-5ece-22b3-2af153fd9ffe@vivier.eu>


Laurent Vivier <laurent@vivier.eu> writes:

> Le 29/04/2020 à 11:26, Alex Bennée a écrit :
>> 
>> Laurent Vivier <laurent@vivier.eu> writes:
>> 
>>> Le 28/04/2020 à 20:43, Alex Bennée a écrit :
>>>>
>>>> KONRAD Frederic <frederic.konrad@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


  reply	other threads:[~2020-04-29 10:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 17:17 [PATCH 0/2] m68k fpu fixes KONRAD Frederic
2020-04-28 17:17 ` [PATCH 1/2] softfloat: m68k: infinity is a valid encoding KONRAD Frederic
2020-04-28 18:43   ` Alex Bennée
2020-04-29  8:48     ` Laurent Vivier
2020-04-29  9:26       ` Alex Bennée
2020-04-29  9:43         ` Laurent Vivier
2020-04-29 10:22           ` Alex Bennée [this message]
2020-04-29 14:27         ` Laurent Vivier
2020-04-29 20:51           ` Alex Bennée
2020-04-29  8:42   ` Laurent Vivier
2020-04-29 12:33     ` KONRAD Frederic
2020-07-13 10:01     ` Andreas Schwab
2020-06-12  8:31   ` Laurent Vivier
2020-06-15 15:59     ` Fred Konrad
2020-06-15 16:46       ` Laurent Vivier
2020-04-28 17:17 ` [PATCH 2/2] target/m68k: fix gdb for m68xxx KONRAD Frederic
2020-04-29  8:57   ` Laurent Vivier
2020-04-29  9:28     ` Alex Bennée
2020-04-29  9:38       ` Laurent Vivier
2020-04-29 12:25         ` KONRAD Frederic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kt2lhfj.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=frederic.konrad@adacore.com \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.