qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]