[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversi
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations |
Date: |
Thu, 29 Jan 2015 14:51:49 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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 <address@hidden>
> ---
> 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 <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations,
Leon Alrae <=