[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/20] softfloat: fix floatx80 handling of Na
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/20] softfloat: fix floatx80 handling of NaN |
Date: |
Wed, 20 Apr 2011 11:35:51 +0100 |
On 20 April 2011 11:11, Aurelien Jarno <address@hidden> wrote:
> @@ -624,10 +630,11 @@ static floatx80 commonNaNToFloatx80( commonNaNT a
> STATUS_PARAM)
> return z;
> }
>
> - if (a.high)
> - z.low = a.high;
> - else
> + if (a.high >> 1) {
> + z.low = LIT64( 0x8000000000000000 ) | a.high >> 1;
> + } else {
> z.low = floatx80_default_nan_low;
> + }
> z.high = ( ( (uint16_t) a.sign )<<15 ) | 0x7FFF;
> return z;
> }
This is still retaining the sign bit from the input if it generates
a default NaN because the mantissa would have been zero. This isn't
consistent with the commonNaNToFloat64/32, which just return the
float64/32_default_nan with whatever sign it has.
-- PMM
- [Qemu-devel] [PATCH v2 00/20] *** SUBJECT HERE ***, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 14/20] target-i386: fix helper_fsqrt() wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 11/20] target-i386: fix helper_fbld_ST0() wrt softfloat, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 04/20] softfloat: add pi constants, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 02/20] softfloat: fix floatx80_is_infinity(), Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 15/20] target-i386: replace approx_rsqrt and approx_rcp by softfloat ops, Aurelien Jarno, 2011/04/20
- [Qemu-devel] [PATCH v2 06/20] softfloat: add floatx80_compare*() functions, Aurelien Jarno, 2011/04/20