[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/14] Add various NaN-handling macros
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH 02/14] Add various NaN-handling macros |
Date: |
Wed, 4 Feb 2009 10:05:55 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Feb 03, 2009 at 12:19:09PM -0800, Nathan Froyd wrote:
> On Tue, Feb 03, 2009 at 08:41:14PM +0100, Aurelien Jarno wrote:
> > On Thu, Jan 22, 2009 at 12:44:02PM -0800, Nathan Froyd wrote:
> > > These simplify the implementation of the floating-point Altivec
> > > instructions and reduce clutter.
> > >
> > > +#undef DO_HANDLE_NAN
> > > +#undef HANDLE_NAN1
> > > +#undef HANDLE_NAN2
> > > +#undef HANDLE_NAN3
> > > #undef VECTOR_FOR_INORDER_I
> > > #undef HI_IDX
> > > #undef LO_IDX
> >
> > This is something already handled by the softfloat code. You should use
> > set_default_nan_mode(1, &env->vec_status) to get this behavior. This
> > could probably done directly in the init code.
>
> I saw the set_default_nan_mode and considered using it. It doesn't give
> the same results as the above macros, though. The Altivec specs say
> that if a particular input is a SNaN, then the output is the
> corresponding QNaN, not the default NaN for the platform. The default
> NaN is only used in specific instances. Also, QNaNs propagate through
> Altivec operations; using set_default_nan_mode would mean that the
> correct propagation no longer occurs.
Ok, I understand now, I have applied the patch. Thanks.
Aurelien
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net