From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqS8-0004zs-4w for qemu-devel@nongnu.org; Thu, 29 Jan 2015 09:52:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGqRz-00030l-JC for qemu-devel@nongnu.org; Thu, 29 Jan 2015 09:52:16 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:23747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGqRz-0002zX-BM for qemu-devel@nongnu.org; Thu, 29 Jan 2015 09:52:07 -0500 Message-ID: <54CA4905.70908@imgtec.com> Date: Thu, 29 Jan 2015 14:51:49 +0000 From: Leon Alrae MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Maciej W. Rozycki" , qemu-devel@nongnu.org Cc: Thomas Schwinge , Aurelien Jarno On 09/12/2014 01:54, Maciej W. Rozycki wrote: > Fix sNaN handling in floating-point format conversion operations, that > are classified by the IEEE 754-2008 standard as general-computational > operations [1]: > > "5.4 formatOf general-computational operations > > "5.4.2 Conversion operations for floating-point formats and decimal > character sequences > > "Implementations shall provide the following formatOf conversion > operations from all supported floating-point formats to all supported > floating-point formats, as well as conversions to and from decimal > character sequences. These operations shall not propagate non-canonical > results. Some format conversion operations produce results in a > different radix than the operands." > > according to the quietening requirement [2] set by the same standard: > > "7.2 Invalid operation > > "For operations producing results in floating-point format, the default > result of an operation that signals the invalid operation exception > shall be a quiet NaN that should provide some diagnostic information > (see 6.2). > > "These operations are: > a) any general-computational or signaling-computational operation > on a signaling NaN (see 6.2), except for some conversions (see > 5.12)" > > and the reference above is [3]: > > "5.12 Details of conversion between floating-point data and external > character sequences" > > so does not apply to conversions a pair of floating-point formats. > > Therefore quieten any sNaN encountered in floating-point format > conversions, in the usual manner. > > References: > > [1] "IEEE Standard for Floating-Point Arithmetic", IEEE Computer > Society, IEEE Std 754-2008, 29 August 2008, pp. 21-22 > > [2] same, p. 37 > > [3] same, p. 30 > > Signed-off-by: Maciej W. Rozycki > --- > This is in particular how MIPS hardware operates, other processors > supposedly do the same if they claim compliance to IEEE 754. > > Please apply. > > qemu-softfloat-convert-snan.diff > Index: qemu-git-trunk/fpu/softfloat.c Reviewed-by: Leon Alrae