qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Michael Morrell <mmorrell@tachyum.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Denormal input handling
Date: Wed, 26 May 2021 18:14:06 -0700	[thread overview]
Message-ID: <a891cfcd-46c3-b838-ec68-13e0e009bce5@linaro.org> (raw)
In-Reply-To: <217fbb53d6764b4a9b63726c1344f7d9@tachyum.com>

On 5/26/21 2:59 PM, Michael Morrell wrote:
> First, I apologize for the duplicate thread.  I thought the first attempt didn't go through.
> 
> I agree with Richard that we need an extra flag bit.  The current behavior is not right for SSE on x86 (it looks like x87 might be different still).   For ARM, setting FPCR.FZ to 1 will result in FPSR.IDC being set for a denormal input (and that input will be flushed to 0), whereas for x86/SSE, setting MXCSR.DAZ to 0 will result in MXCSR.DE being set for a denormal input (and MXCSR.DAZ = 1 flushes that input to 0).

It seems the language for x87 is different because there is no DAZ bit for x87, 
only SSE.  Thus the x87 DE bit is set for a denormal input which will never be 
flushed to zero.

> I'm a little surprised there are no x86 test cases that cover this.

The status of x86 is fairly shakey when it comes to tcg.  Most of the work for 
x86 is all about native virtualization.

The last person to touch this code, Joseph Myers, kindly left us a big fat 
FIXME comment in update_mxcsr_from_sse_status.

> Richard, are you willing to make the change or do you want me to try?

I'll do it.  I've got some outstanding floatx80 cleanups that would be handy to 
build upon while doing this.


r~


  reply	other threads:[~2021-05-27  1:15 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
2021-05-26 21:59   ` Michael Morrell
2021-05-27  1:14     ` Richard Henderson [this message]
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=a891cfcd-46c3-b838-ec68-13e0e009bce5@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=mmorrell@tachyum.com \
    --cc=peter.maydell@linaro.org \
    --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 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).