From: Richard Henderson <richard.henderson@linaro.org>
To: "LIU Zhiwei" <zhiwei_liu@c-sky.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: fpu/softfloat: a question on BFloat 16 support on QEMU
Date: Fri, 26 Jun 2020 08:58:17 -0700 [thread overview]
Message-ID: <9a12aa2e-ee66-ffb5-8598-775615e6ba24@linaro.org> (raw)
In-Reply-To: <29d37daf-ced3-8555-7d25-00baacbb4449@c-sky.com>
On 6/17/20 12:09 AM, LIU Zhiwei wrote:
> If I want to test bfloat16 interfaces, could you give some advice? Should I
> need to modify berkeley-testfloat-3 to support the bfloat16 test.
I think we'll have to write some new code for this.
Easiest might be:
(1) shift left to convert bfloat16 to float32,
(2) if the current rounding mode is directed
(float_round_{down,up,to_zero}), use that;
otherwise use float_round_to_odd so that
we can get the correct bfloat16 rounding later.
(3) use the float32 arithmetic routine.
(4) round to bfloat16 as per the current mode.
This should not require too much new code.
r~
next prev parent reply other threads:[~2020-06-26 15:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 12:53 fpu/softfloat: a question on BFloat 16 support on QEMU LIU Zhiwei
2020-06-08 15:50 ` Alex Bennée
2020-06-09 3:02 ` LIU Zhiwei
2020-06-09 9:42 ` Alex Bennée
2020-06-09 11:16 ` LIU Zhiwei
2020-06-17 7:09 ` LIU Zhiwei
2020-06-26 15:58 ` Richard Henderson [this message]
2020-06-08 19:34 ` Richard Henderson
2020-06-09 3:09 ` LIU Zhiwei
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=9a12aa2e-ee66-ffb5-8598-775615e6ba24@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=zhiwei_liu@c-sky.com \
/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).