qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] add APIs to handle alternative sNaN propagation for fmax/fmin
@ 2021-10-16  8:54 frank.chang
  2021-10-16  8:54 ` [PATCH v4 1/2] softfloat: " frank.chang
  2021-10-16  8:54 ` [PATCH v4 2/2] target/riscv: change the api for RVF/RVD fmin/fmax frank.chang
  0 siblings, 2 replies; 6+ messages in thread
From: frank.chang @ 2021-10-16  8:54 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv; +Cc: Frank Chang

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-20 23:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16  8:54 [PATCH v4 0/2] add APIs to handle alternative sNaN propagation for fmax/fmin frank.chang
2021-10-16  8:54 ` [PATCH v4 1/2] softfloat: " frank.chang
2021-10-16 17:59   ` Richard Henderson
2021-10-16  8:54 ` [PATCH v4 2/2] target/riscv: change the api for RVF/RVD fmin/fmax frank.chang
2021-10-20  2:56   ` Frank Chang
2021-10-20 23:24   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).