[PATCH v4 0/2] add APIs to handle alternative sNaN propagation for fmax/fmin

frank.chang@sifive.com posted 2 patches 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211016085428.3001501-1-frank.chang@sifive.com
Maintainers: Alistair Francis <alistair.francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Aurelien Jarno <aurelien@aurel32.net>, "Alex Bennée" <alex.bennee@linaro.org>, Bin Meng <bin.meng@windriver.com>, Peter Maydell <peter.maydell@linaro.org>
fpu/softfloat-parts.c.inc | 25 +++++++++++++++++++++++--
fpu/softfloat.c           | 19 +++++++++++++------
include/fpu/softfloat.h   | 10 ++++++++++
target/riscv/fpu_helper.c | 16 ++++++++++++----
4 files changed, 58 insertions(+), 12 deletions(-)
[PATCH v4 0/2] add APIs to handle alternative sNaN propagation for fmax/fmin
Posted by frank.chang@sifive.com 2 years, 6 months ago
From: Frank Chang <frank.chang@sifive.com>

In IEEE 754-2019, minNum, maxNum, minNumMag and maxNumMag are removed
and replaced with minimum, minimumNumber, maximum and maximumNumber.

minimumNumber/maximumNumber behavior for SNaN is changed to:
  * If both operands are NaNs, a QNaN is returned.
  * If either operand is a SNaN, an invalid operation exception is signaled,
    but unless both operands are NaNs, the SNaN is otherwise ignored and
    not converted to a QNaN.

This patchset add support of the above alternative sNaN propagation for
fmax/fmin, which is required by RISC-V floating-point v2.2.

Changelog:

v2:
  * Change API names from *_noprop() to *_maximum_number()
    and *_minimum_number().
  * Pick softfloat min/max APIs based on CPU privilege spec version.

Chih-Min Chao (2):
  softfloat: add APIs to handle alternative sNaN propagation for
    fmax/fmin
  target/riscv: change the api for RVF/RVD fmin/fmax

 fpu/softfloat-parts.c.inc | 25 +++++++++++++++++++++++--
 fpu/softfloat.c           | 19 +++++++++++++------
 include/fpu/softfloat.h   | 10 ++++++++++
 target/riscv/fpu_helper.c | 16 ++++++++++++----
 4 files changed, 58 insertions(+), 12 deletions(-)

--
2.25.1