* [PULL for-4.2 0/1] softfp patch queue @ 2019-10-30 18:09 Richard Henderson 2019-10-30 18:09 ` [PULL for-4.2 1/1] softfp: Added hardfloat conversion from float32 to float64 Richard Henderson ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Richard Henderson @ 2019-10-30 18:09 UTC (permalink / raw) To: qemu-devel; +Cc: peter.maydell Just one easy patch that made the cutoff. r~ The following changes since commit 16884391c750d0c5e863f55ad7aaaa146fc5181e: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-10-29' into staging (2019-10-29 20:06:08 +0000) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-sfp-20191030 for you to fetch changes up to 21381dcf0ca8fc822328e30570c8465ec4e52be9: softfp: Added hardfloat conversion from float32 to float64 (2019-10-30 19:03:37 +0100) ---------------------------------------------------------------- Use hardfloat for float32_to_float64 ---------------------------------------------------------------- Matus Kysel (1): softfp: Added hardfloat conversion from float32 to float64 fpu/softfloat.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PULL for-4.2 1/1] softfp: Added hardfloat conversion from float32 to float64 2019-10-30 18:09 [PULL for-4.2 0/1] softfp patch queue Richard Henderson @ 2019-10-30 18:09 ` Richard Henderson 2019-10-30 21:14 ` [PULL for-4.2 0/1] softfp patch queue no-reply 2019-10-31 10:07 ` Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: Richard Henderson @ 2019-10-30 18:09 UTC (permalink / raw) To: qemu-devel; +Cc: peter.maydell, Matus Kysel From: Matus Kysel <mkysel@tachyum.com> Reintroduce float32_to_float64 that was removed here: https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg00455.html - nbench test it not actually calling this function at all - SPECS 2006 significat number of tests impoved their runtime, just few of them showed small slowdown Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Matus Kysel <mkysel@tachyum.com> Message-Id: <20191017142133.59439-1-mkysel@tachyum.com> [rth: Add comment about impossible inexact exceptions.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- fpu/softfloat.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 0638c9f4e0..301ce3b537 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1920,13 +1920,30 @@ float16 float32_to_float16(float32 a, bool ieee, float_status *s) return float16a_round_pack_canonical(pr, s, fmt16); } -float64 float32_to_float64(float32 a, float_status *s) +static float64 QEMU_SOFTFLOAT_ATTR +soft_float32_to_float64(float32 a, float_status *s) { FloatParts p = float32_unpack_canonical(a, s); FloatParts pr = float_to_float(p, &float64_params, s); return float64_round_pack_canonical(pr, s); } +float64 float32_to_float64(float32 a, float_status *s) +{ + if (likely(float32_is_normal(a))) { + /* Widening conversion can never produce inexact results. */ + union_float32 uf; + union_float64 ud; + uf.s = a; + ud.h = uf.h; + return ud.s; + } else if (float32_is_zero(a)) { + return float64_set_sign(float64_zero, float32_is_neg(a)); + } else { + return soft_float32_to_float64(a, s); + } +} + float16 float64_to_float16(float64 a, bool ieee, float_status *s) { const FloatFmt *fmt16 = ieee ? &float16_params : &float16_params_ahp; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PULL for-4.2 0/1] softfp patch queue 2019-10-30 18:09 [PULL for-4.2 0/1] softfp patch queue Richard Henderson 2019-10-30 18:09 ` [PULL for-4.2 1/1] softfp: Added hardfloat conversion from float32 to float64 Richard Henderson @ 2019-10-30 21:14 ` no-reply 2019-10-31 10:07 ` Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: no-reply @ 2019-10-30 21:14 UTC (permalink / raw) To: richard.henderson; +Cc: peter.maydell, qemu-devel Patchew URL: https://patchew.org/QEMU/20191030180953.24180-1-richard.henderson@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL for-4.2 0/1] softfp patch queue Type: series Message-id: 20191030180953.24180-1-richard.henderson@linaro.org === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Switched to a new branch 'test' 756cf34 softfp: Added hardfloat conversion from float32 to float64 === OUTPUT BEGIN === ERROR: spaces required around that '*' (ctx:WxV) #31: FILE: fpu/softfloat.c:1924: +soft_float32_to_float64(float32 a, float_status *s) ^ ERROR: spaces required around that '*' (ctx:WxV) #38: FILE: fpu/softfloat.c:1931: +float64 float32_to_float64(float32 a, float_status *s) ^ total: 2 errors, 0 warnings, 31 lines checked Commit 756cf34c13d0 (softfp: Added hardfloat conversion from float32 to float64) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20191030180953.24180-1-richard.henderson@linaro.org/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PULL for-4.2 0/1] softfp patch queue 2019-10-30 18:09 [PULL for-4.2 0/1] softfp patch queue Richard Henderson 2019-10-30 18:09 ` [PULL for-4.2 1/1] softfp: Added hardfloat conversion from float32 to float64 Richard Henderson 2019-10-30 21:14 ` [PULL for-4.2 0/1] softfp patch queue no-reply @ 2019-10-31 10:07 ` Peter Maydell 2 siblings, 0 replies; 4+ messages in thread From: Peter Maydell @ 2019-10-31 10:07 UTC (permalink / raw) To: Richard Henderson; +Cc: QEMU Developers On Wed, 30 Oct 2019 at 18:09, Richard Henderson <richard.henderson@linaro.org> wrote: > > Just one easy patch that made the cutoff. > > > r~ > > > The following changes since commit 16884391c750d0c5e863f55ad7aaaa146fc5181e: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-10-29' into staging (2019-10-29 20:06:08 +0000) > > are available in the Git repository at: > > https://github.com/rth7680/qemu.git tags/pull-sfp-20191030 > > for you to fetch changes up to 21381dcf0ca8fc822328e30570c8465ec4e52be9: > > softfp: Added hardfloat conversion from float32 to float64 (2019-10-30 19:03:37 +0100) > > ---------------------------------------------------------------- > Use hardfloat for float32_to_float64 > > ---------------------------------------------------------------- > Matus Kysel (1): > softfp: Added hardfloat conversion from float32 to float64 > > fpu/softfloat.c | 19 ++++++++++++++++++- Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2 for any user-visible changes. -- PMM ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-31 10:10 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-30 18:09 [PULL for-4.2 0/1] softfp patch queue Richard Henderson 2019-10-30 18:09 ` [PULL for-4.2 1/1] softfp: Added hardfloat conversion from float32 to float64 Richard Henderson 2019-10-30 21:14 ` [PULL for-4.2 0/1] softfp patch queue no-reply 2019-10-31 10:07 ` Peter Maydell
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).