From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36615 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTCMq-0002nz-Io for qemu-devel@nongnu.org; Thu, 16 Dec 2010 06:51:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTCMp-0000Lc-0V for qemu-devel@nongnu.org; Thu, 16 Dec 2010 06:51:28 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:58074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTCMo-0000Jr-QL for qemu-devel@nongnu.org; Thu, 16 Dec 2010 06:51:26 -0500 From: Peter Maydell Date: Thu, 16 Dec 2010 11:51:16 +0000 Message-Id: <1292500278-26215-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/2] ARM: Implement correct NaN propagation rules List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Nathan Froyd IEEE754 doesn't specify precisely what NaN should be returned as the result of an operation on two input NaNs. The existing softfloat code hardwires x87 propagation rules. This patchset abstracts out the code in the various propagateFloat*NaN() functions which picks a NaN to return, so that it can be easily replaced on a per-target basis. It also implements the correct version of this routine for ARM. I've tested this by the usual random instruction set method. The first patch makes no change to NaN handling (ie it is purely a refactoring of the code); the second brings ARM into line with the hardware implementation. Maintainers of other targets should consider implementing a suitable version of the pickNaN() function. I know the SPARC architecture manual documents NaN rules, and they're not the x87 ones, for instance. Peter Maydell (2): softfloat: abstract out target-specific NaN propagation rules ARM: Implement correct NaN propagation rules fpu/softfloat-specialize.h | 183 +++++++++++++++++++++++++++++-------------- 1 files changed, 123 insertions(+), 60 deletions(-)