qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] softfloat: add APIs to handle alternative sNaN propagati


From: Richard Henderson
Subject: Re: [PATCH 2/3] softfloat: add APIs to handle alternative sNaN propagation
Date: Thu, 13 Aug 2020 10:21:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/30/20 2:52 AM, Chih-Min Chao wrote:
> For "fmax/fmin ft0, ft1, ft2" and if one of the inputs is sNaN,
>   The original logic
>     return NaN and set invalid flag if ft1 == sNaN || ft2 == sNan
> 
>   The alternative path
>     set invalid flag if ft1 == sNaN || ft2 == sNaN
>     return NaN if ft1 == sNaN && ft2 == sNaN
> 
>    The ieee754 spec allows both implementation and some architecture such
>    as riscv choose differenct defintion in two spec versions.
>    (riscv-spec-v2.2 use original version, riscv-spec-20191213 changes to
>     alternative)
> 
> Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>

If both ft1 and ft2 are SNaN, surely the returned result is silenced?  That is
something that is handled by pick_nan, but is not handled here.

Also, the patch subject should be modified to emphasize that this only applies
to min/max and not propagation of all SNaN.


r~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]