[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 07/20] softfloat: fix float*_scalnb() corner
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 07/20] softfloat: fix float*_scalnb() corner cases |
Date: |
Wed, 20 Apr 2011 11:40:51 +0100 |
On 20 April 2011 11:11, Aurelien Jarno <address@hidden> wrote:
> float*_scalnb() were not taking into account all cases. This patch fixes
> some corner cases:
> - NaN values in input were not properly propagated and the invalid flag
> not correctly raised. Use propagateFloat*NaN() for that.
> - NaN or infinite values in input of floatx80_scalnb() were not correctly
> detected due to a typo.
> - The sum of exponent and n could overflow, leading to strange results.
> Additionally having int16 defined to int make that happening for a very
> small range of values. Fix that by saturating n to the maximum exponent
> range, and using an explicit wider type if needed.
>
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
> fpu/softfloat.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
> 1 files changed, 42 insertions(+), 5 deletions(-)
>
> v1 -> v2: fix condition for float32
Reviewed-by: Peter Maydell <address@hidden>
-- PMM
- [Qemu-devel] [PATCH v2 06/20] softfloat: add floatx80_compare*() functions, (continued)
- [Qemu-devel] [PATCH v2 06/20] softfloat: add floatx80_compare*() functions, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 20/20] target-i386: switch to softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 19/20] target-i386: fix constants wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 09/20] softfloat-native: add float*_is_any_nan() functions, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 12/20] target-i386: fix helper_fxtract() wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 16/20] target-i386: add CPU86_LDouble <-> double conversion functions, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 03/20] softfloat: add floatx80 constants, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 05/20] softfloat-native: add a few constant values, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 07/20] softfloat: fix float*_scalnb() corner cases, Aurelien Jarno, 2011/04/20
- Re: [Qemu-devel] [PATCH v2 07/20] softfloat: fix float*_scalnb() corner cases,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 13/20] target-i386: fix helper_fdiv() wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 18/20] target-i386: fix helper_fprem() and helper_fprem1() wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 08/20] softfloat-native: fix float*_scalbn() functions, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 10/20] target-i386: fix helper_fscale() wrt softfloat, Aurelien Jarno, 2011/04/20