qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: "J. Mayer" <l_indien@magic.fr>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] Fix NaN handling in softfloat
Date: Tue, 6 Nov 2007 21:14:34 +0000	[thread overview]
Message-ID: <20071106211434.GH9561@networkno.de> (raw)
In-Reply-To: <1194379274.31210.100.camel@rapid>

J. Mayer wrote:
> 
> On Sat, 2007-11-03 at 22:28 +0100, Aurelien Jarno wrote: 
> > On Sat, Nov 03, 2007 at 02:06:04PM -0400, Daniel Jacobowitz wrote:
> > > On Sat, Nov 03, 2007 at 06:35:48PM +0100, Aurelien Jarno wrote:
> > > > Hi all,
> > > > 
> > > > The current softfloat implementation changes qNaN into sNaN when 
> > > > converting between formats, for no reason. The attached patch fixes
> > > > that. It also fixes an off-by-one in the extended double precision
> > > > format (aka floatx80), the mantissa is 64-bit long and not 63-bit
> > > > long.
> > > > 
> > > > With this patch applied all the glibc 2.7 floating point tests
> > > > are successfull on MIPS and MIPSEL.
> > > 
> > > FYI, I posted a similar patch and haven't had time to get back to it.
> > > Andreas reminded me that we need to make sure at least one mantissa
> > > bit is set.  If we're confident that the common NaN format will
> > > already have some bit other than the qnan/snan bit set, this is fine;
> > > otherwise, we might want to forcibly set some other mantissa bit.
> > > 
> > 
> > Please find an updated patch below. I have tried to match real x86, MIPS,
> > HPPA, PowerPC and SPARC hardware when all mantissa bits are cleared.
> 
> It's a good idea to fix NaN problems here but in my opinion, it's a bad
> idea to have target dependant code here. This code should implement IEEE
> behavior.

IEEE doesn't prescribe the signalling/non-signalling bit's value.
MIPS FPUs are fully IEEE conformant.


Thiemo

  reply	other threads:[~2007-11-06 21:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 17:35 [Qemu-devel] [PATCH] Fix NaN handling in softfloat Aurelien Jarno
2007-11-03 18:06 ` Daniel Jacobowitz
2007-11-03 19:14   ` Aurelien Jarno
2007-11-03 21:28   ` Aurelien Jarno
2007-11-06 20:01     ` J. Mayer
2007-11-06 21:14       ` Thiemo Seufer [this message]
2007-11-07 23:05       ` Aurelien Jarno
2007-11-07 23:12         ` Daniel Jacobowitz
2007-11-08  0:41           ` Thiemo Seufer
2007-11-09 22:31         ` J. Mayer
2007-11-10  9:35           ` Aurelien Jarno
2007-11-10 13:31             ` J. Mayer
2007-11-10 16:15               ` Aurelien Jarno
2007-11-10 17:14                 ` J. Mayer
2007-11-10 18:09                   ` Aurelien Jarno
2007-11-10 22:44                     ` J. Mayer
2007-11-10 21:18     ` Thiemo Seufer
2007-11-10 21:46       ` Aurelien Jarno
2007-11-21 15:49         ` Aurelien Jarno
2007-12-16 12:43           ` Aurelien Jarno
2007-11-03 18:30 ` Thiemo Seufer
2007-11-03 19:13   ` Aurelien Jarno

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=20071106211434.GH9561@networkno.de \
    --to=ths@networkno.de \
    --cc=aurelien@aurel32.net \
    --cc=l_indien@magic.fr \
    --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).