Re: [Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases

2011-04-20 Thread Aurelien Jarno
On Tue, Apr 19, 2011 at 12:57:23PM +0100, Peter Maydell wrote: > On 18 April 2011 21:59, Aurelien Jarno wrote: > > > @@ -6349,6 +6352,12 @@ float32 float32_scalbn( float32 a, int n > > STATUS_PARAM ) > >     else if ( aSig == 0 ) > >         return a; > > > > +    if (n > 0x80) { > > +        n

Re: [Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases

2011-04-19 Thread Peter Maydell
On 18 April 2011 21:59, Aurelien Jarno wrote: > @@ -6349,6 +6352,12 @@ float32 float32_scalbn( float32 a, int n STATUS_PARAM ) >     else if ( aSig == 0 ) >         return a; > > +    if (n > 0x80) { > +        n = 0x80; > +    } else if (n < -0x80) { > +        n = -0x80; > +    } > + >     aExp

[Qemu-devel] [PATCH 07/20] softfloat: fix float*_scalnb() corner cases

2011-04-18 Thread Aurelien Jarno
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