qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/12] ARM: Return correct result for float-to-i


From: Nathan Froyd
Subject: Re: [Qemu-devel] [PATCH 07/12] ARM: Return correct result for float-to-integer conversion of NaN
Date: Mon, 29 Nov 2010 08:58:16 -0800
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Mon, Nov 29, 2010 at 04:49:24PM +0000, Peter Maydell wrote:
> On 29 November 2010 16:38, Nathan Froyd <address@hidden> wrote:
> > Why not just use:
> >
> > static int float32_is_any_nan(float32 x)
> > {
> >  return float32_is_nan(x) || float32_is_signaling_nan(x);
> > }
> >
> > and likewise for the 64-bit case?
> 
> That was what my first-pass patches did, but I
> rewrote them this way because it seemed more
> straightforward to just test for "is this a NaN" rather
> than calling two other functions which each test for
> "is this some subset of NaN space".
> 
> I suppose you could argue that softfloat ought to
> have _is_nan() [with the semantics you'd expect
> from the function name, not the ones it currently has!],
> _is_signalling_nan() and _is_quiet_nan() functions
> built in, but it doesn't...

I agree that the functions are poorly named.  I think it'd be better to
leave the bit-twiddling to the softfloat bits, though.  There's
precedent for the more verbose approach in other backends, too.

-Nathan



reply via email to

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