From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, laurent.desnogues@gmail.com,
peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding
Date: Tue, 14 Aug 2018 09:32:44 +0100 [thread overview]
Message-ID: <87bma5wdoz.fsf@linaro.org> (raw)
In-Reply-To: <20180814002653.12828-1-richard.henderson@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> In 88808a022c0, I tried to fix an overflow problem that affected float16
> scaling by coverting first to float64 and then rounding after that.
>
> However, Laurent reported that -0x3ff40000000001 converted to float16
> resulted in 0xfbfe instead of the expected 0xfbff. This is caused by
> the inexact conversion to float64.
>
> Rather than build more logic into target/arm to compensate, just add
> a function that takes a scaling parameter so that the whole thing is
> done all at once with only one rounding.
>
> I don't have a failing test case for the float-to-int paths, but it
> seemed best to apply the same solution.
Can't we add the constants to the fcvt test case?
>
>
> r~
>
>
> Richard Henderson (4):
> softfloat: Add scaling int-to-float routines
> softfloat: Add scaling float-to-int routines
> target/arm: Use the int-to-float-scale softfloat routines
> target/arm: Use the float-to-int-scale softfloat routines
>
> include/fpu/softfloat.h | 169 ++++++++----
> fpu/softfloat.c | 579 +++++++++++++++++++++++++++++++---------
> target/arm/helper.c | 130 ++++-----
> 3 files changed, 628 insertions(+), 250 deletions(-)
--
Alex Bennée
next prev parent reply other threads:[~2018-08-14 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 0:26 [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding Richard Henderson
2018-08-14 0:26 ` [Qemu-devel] [PATCH 1/4] softfloat: Add scaling int-to-float routines Richard Henderson
2018-08-14 0:26 ` [Qemu-devel] [PATCH 2/4] softfloat: Add scaling float-to-int routines Richard Henderson
2018-08-14 0:26 ` [Qemu-devel] [PATCH 3/4] target/arm: Use the int-to-float-scale softfloat routines Richard Henderson
2018-08-14 0:26 ` [Qemu-devel] [PATCH 4/4] target/arm: Use the float-to-int-scale " Richard Henderson
2018-08-14 8:32 ` Alex Bennée [this message]
2018-08-14 14:47 ` [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding Richard Henderson
2018-08-14 15:38 ` Alex Bennée
2018-08-16 1:00 ` no-reply
2018-08-20 17:15 ` Peter Maydell
2018-08-20 19:35 ` no-reply
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=87bma5wdoz.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=laurent.desnogues@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).