qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Michael Morrell <mmorrell@tachyum.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Denormal input handling
Date: Wed, 26 May 2021 21:18:41 +0100	[thread overview]
Message-ID: <CAFEAcA-BnxgejNgo0XFU_aegdXfN2mFr9E6xa5BPRxHLdfSt_A@mail.gmail.com> (raw)
In-Reply-To: <30eafc8be31446f9aecbc40f487467e1@tachyum.com>

On Wed, 26 May 2021 at 20:07, Michael Morrell <mmorrell@tachyum.com> wrote:
> I see support in QEMU for architectures which have a denormal
> input flag bit and those that have a "flush inputs to zero" control
> bit, but the implementation is not specializable and seems wrong
> for x86 at least.

> For example, in sf_canonicalize, if the input is denormal and
> "flush_inputs_to_zero" is true, the "input denormal" flag is set
> and then the value is set to a zero value, and if the input is
> denormal and "flush_inputs_to_zero" is false, then the input
> is simply normalized.

This is the intended behaviour -- if a target arch needs
"denormalized inputs should be flushed to zero", it sets
the float_status flush_inputs_to_zero flag. If it also
wants to be able to detect when this has happened, it can
then look at the input_denormal flag. This matches the behaviour
that Arm needs, and it is for Arm that the flush_inputs_to_zero
and input_denormal flags were introduced.

> I think the behavior should be for denormal inputs that if
> "flush_inputs_to_zero" is true, then the value is set to zero;
> and if "flush_inputs_to_zero" is false, set the "input denormal"
> flag and normalize the input.

> This matches what x86 does (I'm not sure about other architectures).

What in particular does x86 want that it isn't getting at
the moment? If it needs some additional variation of behaviour
we can look at adding a new status flag to control that.

thanks
-- PMM


  reply	other threads:[~2021-05-26 20:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 17:37 Denormal input handling Michael Morrell
2021-05-26 20:18 ` Peter Maydell [this message]
2021-05-26 21:59   ` Michael Morrell
2021-05-27  1:14     ` Richard Henderson
2021-06-21 23:13 ` Michael Morrell
2021-06-21 23:30   ` Richard Henderson
2021-06-21 23:39     ` Michael Morrell
2021-06-22  0:57     ` Michael Morrell
2021-06-22 18:50       ` Michael Morrell
     [not found] <746277332.296230.1622055775751.ref@mail.yahoo.com>
2021-05-26 19:02 ` Michael Morrell via
2021-05-26 19:23   ` Richard Henderson
2021-05-26 19:28     ` Richard Henderson
2021-05-26 19:52       ` Michael Morrell via
2021-05-26 20:15         ` Richard Henderson

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=CAFEAcA-BnxgejNgo0XFU_aegdXfN2mFr9E6xa5BPRxHLdfSt_A@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=mmorrell@tachyum.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).