From: Richard Henderson <richard.henderson@linaro.org>
To: frank.chang@sifive.com, qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: "Chih-Min Chao" <chihmin.chao@sifive.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH v4 1/2] softfloat: add APIs to handle alternative sNaN propagation for fmax/fmin
Date: Sat, 16 Oct 2021 10:59:02 -0700 [thread overview]
Message-ID: <9dd37c01-835b-536a-c0ba-3ef23bbbfa42@linaro.org> (raw)
In-Reply-To: <20211016085428.3001501-2-frank.chang@sifive.com>
On 10/16/21 1:54 AM, frank.chang@sifive.com wrote:
> From: Chih-Min Chao<chihmin.chao@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.chao@sifive.com>
> Signed-off-by: Frank Chang<frank.chang@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.henderson@linaro.org>
r~
next prev parent reply other threads:[~2021-10-16 18:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9dd37c01-835b-536a-c0ba-3ef23bbbfa42@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=chihmin.chao@sifive.com \
--cc=frank.chang@sifive.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).