From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUdhp-0005OZ-Ul for qemu-devel@nongnu.org; Wed, 04 Feb 2009 04:06:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUdho-0005Nh-Nk for qemu-devel@nongnu.org; Wed, 04 Feb 2009 04:06:01 -0500 Received: from [199.232.76.173] (port=46490 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUdho-0005NR-Hj for qemu-devel@nongnu.org; Wed, 04 Feb 2009 04:06:00 -0500 Received: from hall.aurel32.net ([88.191.82.174]:36259) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUdho-0006eZ-3W for qemu-devel@nongnu.org; Wed, 04 Feb 2009 04:06:00 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LUdhm-0000SM-2i for qemu-devel@nongnu.org; Wed, 04 Feb 2009 10:05:58 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LUdhj-0005Q1-K3 for qemu-devel@nongnu.org; Wed, 04 Feb 2009 10:05:55 +0100 Date: Wed, 4 Feb 2009 10:05:55 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 02/14] Add various NaN-handling macros Message-ID: <20090204090555.GA20802@volta.aurel32.net> References: <1232657054-30100-1-git-send-email-froydnj@codesourcery.com> <1232657054-30100-3-git-send-email-froydnj@codesourcery.com> <20090203194114.GA18984@volta.aurel32.net> <20090203201908.GD15286@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090203201908.GD15286@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 aurelien@aurel32.net http://www.aurel32.net