From: Richard Henderson <richard.henderson@linaro.org>
To: Chih-Min Chao <chihmin.chao@sifive.com>,
qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH 2/3] softfloat: add APIs to handle alternative sNaN propagation
Date: Thu, 13 Aug 2020 10:21:47 -0700 [thread overview]
Message-ID: <aa334be5-e325-8d96-a3ee-00c82cfe2c4d@linaro.org> (raw)
In-Reply-To: <1596102747-20226-3-git-send-email-chihmin.chao@sifive.com>
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~
next prev parent reply other threads:[~2020-08-13 17:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 9:52 [PATCH 0/3] float16 APIs and alternative sNaN handling Chih-Min Chao
2020-07-30 9:52 ` [PATCH 1/3] softfloat: target/riscv: implement full set fp16 comparision Chih-Min Chao
2020-08-12 16:30 ` Alistair Francis
2020-08-13 17:22 ` Richard Henderson
2020-07-30 9:52 ` [PATCH 2/3] softfloat: add APIs to handle alternative sNaN propagation Chih-Min Chao
2020-08-13 17:21 ` Richard Henderson [this message]
2020-08-14 8:59 ` Chih-Min Chao
2020-08-14 16:15 ` Richard Henderson
2020-07-30 9:52 ` [PATCH 3/3] softfloat: add fp16 and uint8/int8 interconvert functions Chih-Min Chao
2020-08-13 17:25 ` Richard Henderson
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=aa334be5-e325-8d96-a3ee-00c82cfe2c4d@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=chihmin.chao@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).