From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IoNNp-0000Ag-NI for qemu-devel@nongnu.org; Sat, 03 Nov 2007 14:06:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IoNNn-0008WN-2t for qemu-devel@nongnu.org; Sat, 03 Nov 2007 14:06:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoNNm-0008W8-S8 for qemu-devel@nongnu.org; Sat, 03 Nov 2007 14:06:06 -0400 Received: from nan.false.org ([208.75.86.248]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IoNNm-0005aG-FV for qemu-devel@nongnu.org; Sat, 03 Nov 2007 14:06:06 -0400 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B66EC9834A for ; Sat, 3 Nov 2007 18:06:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 87A0E9829E for ; Sat, 3 Nov 2007 18:06:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IoNNk-0003pO-NR for qemu-devel@nongnu.org; Sat, 03 Nov 2007 14:06:04 -0400 Date: Sat, 3 Nov 2007 14:06:04 -0400 From: Daniel Jacobowitz Subject: Re: [Qemu-devel] [PATCH] Fix NaN handling in softfloat Message-ID: <20071103180604.GA14403@caradoc.them.org> References: <20071103173548.GA16847@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071103173548.GA16847@hall.aurel32.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. -- Daniel Jacobowitz CodeSourcery