qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 08/19] target-alpha: use new float64_unordered() function
Date: Thu, 14 Apr 2011 09:27:10 -0700	[thread overview]
Message-ID: <4DA7205E.1070208@twiddle.net> (raw)
In-Reply-To: <BANLkTi=xrNTBgtB1Gykg0pSARoM+cdCRQA@mail.gmail.com>

On 04/14/2011 08:39 AM, Peter Maydell wrote:
>>  Exponent underflow and disabled:
>>    Supply +0, no exception delivered to user.
>>
>>  Exponent underflow and enabled:
>>    Supply +-MIN denorm, Underflow delivered to user.
>>
>>    Footnote 3, Overflow and Underflow have priority over Inexact.
> 
> Thanks. Does "no exception delivered to user" mean also
> "and do not set FPCR bit UNF" ?

Yes.

> The reason I thought it might set Inexact is that I was looking
> at page 4-79, which says:
> 
> "If both the UNFD (underflow disable) bit and the UNDZ (underflow
>  to zero) bit are set in the FPCR, the implementation sets the
>  result of an underflow operation to a true zero result. The
>  zeroing of a denormal result by UNDZ must also be treated as an
>  inexact result."

Hum.  It looks like we can choose between these results then,
depending on the intersection of the FPCR disable bits, and
the per-instruction trapping mode bits (see section 4.7.7.2).

I *think* what would be best for Alpha is if, within softfloat,
both conditions are signaled, and then we can filter the result
that is actually needed via helper_fp_exc_raise?  It's hard to
say without actually doing the work...

Unfortunately, I suspect that the Correct result on real HW
also depends on the OS completion handler, and I know that at
least for Linux that code was written before UNDZ was added.
So I don't know if even real HW produces the correct result
when considering Underflow priority over Inexact.


r~

  reply	other threads:[~2011-04-14 16:27 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 21:59 [Qemu-devel] [PATCH 00/19] softfloat and FPU fixes/improvements Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 01/19] softfloat: use GCC builtins to count the leading zeros Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 02/19] cpu-all.h: define CPU_LDoubleU Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 03/19] target-i386: use CPU_LDoubleU instead of a private union Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 04/19] target-i386: use float unions from cpu-all.h Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 05/19] target-i386: add floatx_{add, mul, sub} and use them Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 06/19] softfloat: add float*_unordered_{, quiet}() functions Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 07/19] softfloat-native: add float*_unordered_quiet() functions Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 08/19] target-alpha: use new float64_unordered() function Aurelien Jarno
2011-04-13 14:52   ` Peter Maydell
2011-04-13 15:38     ` Richard Henderson
2011-04-13 15:42       ` Peter Maydell
2011-04-13 15:53         ` Richard Henderson
2011-04-13 18:18           ` Aurelien Jarno
2011-04-14  9:14       ` Peter Maydell
2011-04-14 15:14         ` Richard Henderson
2011-04-14 15:39           ` Peter Maydell
2011-04-14 16:27             ` Richard Henderson [this message]
2011-04-14 16:48               ` Peter Maydell
2011-04-14 17:01                 ` Richard Henderson
2011-04-12 21:59 ` [Qemu-devel] [PATCH 09/19] target-mips: use new float*_unordered*() functions Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 10/19] target-i386: fix CMPUNORDPS/D and CMPORDPS/D instructions Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 11/19] softfloat: rename float*_eq() into float*_eq_quiet() Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 12/19] softfloat: rename float*_eq_signaling() into float*_eq() Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 13/19] softfloat: move float*_eq and float*_eq_quiet Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 14/19] softfloat: improve description of comparison functions Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 15/19] target-arm: fix wrong usage of floatx80_eq_quiet() Aurelien Jarno
2011-04-12 22:41   ` Peter Maydell
2011-04-13 18:11     ` Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 16/19] target-alpha: fix wrong usage of float64_eq_quiet() Aurelien Jarno
2011-04-13 15:15   ` Peter Maydell
2011-04-12 21:59 ` [Qemu-devel] [PATCH 17/19] target-ppc: fix SPE comparison functions Aurelien Jarno
2011-04-13  2:40   ` Nathan Froyd
2011-04-13 18:11     ` Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 18/19] target-mips: simplify FP comparisons Aurelien Jarno
2011-04-12 21:59 ` [Qemu-devel] [PATCH 19/19] target-mips: don't hardcode softfloat exception bits Aurelien Jarno
2011-04-13 15:45 ` [Qemu-devel] [PATCH 00/19] softfloat and FPU fixes/improvements Peter Maydell

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=4DA7205E.1070208@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --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).