[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-roundin
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding |
Date: |
Mon, 13 Aug 2018 17:26:49 -0700 |
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.
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(-)
--
2.17.1
- [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding,
Richard Henderson <=
- [Qemu-devel] [PATCH 1/4] softfloat: Add scaling int-to-float routines, Richard Henderson, 2018/08/13
- [Qemu-devel] [PATCH 3/4] target/arm: Use the int-to-float-scale softfloat routines, Richard Henderson, 2018/08/13
- [Qemu-devel] [PATCH 4/4] target/arm: Use the float-to-int-scale softfloat routines, Richard Henderson, 2018/08/13
- [Qemu-devel] [PATCH 2/4] softfloat: Add scaling float-to-int routines, Richard Henderson, 2018/08/13
- Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding, Alex Bennée, 2018/08/14
- Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding, no-reply, 2018/08/16
- Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding, Peter Maydell, 2018/08/20
- Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding, no-reply, 2018/08/20