On 10/16/21 1:54 AM, frank.ch...@sifive.com wrote:
From: Chih-Min Chao<chihmin.c...@sifive.com>

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 only if ft1 == NaN && ft2 == NaN.

The IEEE 754 spec allows both implementation and some architecture such
as riscv choose different defintions in two spec versions.
(riscv-spec-v2.2 use original version, riscv-spec-20191213 changes to
  alternative)

Signed-off-by: Chih-Min Chao<chihmin.c...@sifive.com>
Signed-off-by: Frank Chang<frank.ch...@sifive.com>
---
  fpu/softfloat-parts.c.inc | 25 +++++++++++++++++++++++--
  fpu/softfloat.c           | 19 +++++++++++++------
  include/fpu/softfloat.h   | 10 ++++++++++
  3 files changed, 46 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to