From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCU5U-0003u2-1u for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCU5R-0001M7-Qp for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:44 -0400 Received: from hall.aurel32.net ([88.191.126.93]:41591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCU5R-0001M0-Ie for qemu-devel@nongnu.org; Wed, 20 Apr 2011 05:52:41 -0400 Date: Wed, 20 Apr 2011 11:41:27 +0200 From: Aurelien Jarno Message-ID: <20110420094127.GH6388@volta.aurel32.net> References: <1303160412-8107-1-git-send-email-aurelien@aurel32.net> <1303160412-8107-18-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 17/20] target-i386: fix logarithmic and trigonometric helpers wrt softfloat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Tue, Apr 19, 2011 at 06:37:14PM +0100, Peter Maydell wrote: > On 18 April 2011 22:00, Aurelien Jarno wrote: > > +#include > > Why does this patch need this? I couldn't see anywhere where > the patch added calls to math functions we weren't calling before, > or did I miss one? Because softloat-native.h include it, but not softfloat.h. > >  void helper_fptan(void) > >  { > > -    CPU86_LDouble fptemp; > > +    double fptemp = CPU86_LDouble_to_double(ST0); > > > > -    fptemp = ST0; > >     if((fptemp > MAXTAN)||(fptemp < -MAXTAN)) { > >         env->fpus |= 0x400; > >     } else { > > -        ST0 = tan(fptemp); > > +        fptemp = tan(fptemp); > > +        ST0 = double_to_CPU86_LDouble(fptemp); > >         fpush(); > > -        ST0 = 1.0; > > +        ST0 = double_to_CPU86_LDouble(1.0); > > You could just say: > ST0 = floatx_one; > Correct, will fix that. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net