From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42791 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsBHk-0000au-DA for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:45:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsBHj-0000SV-91 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:45:28 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:39284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsBHj-0000Rv-6P for qemu-devel@nongnu.org; Wed, 23 Feb 2011 04:45:27 -0500 Received: by qwj8 with SMTP id 8so1914826qwj.4 for ; Wed, 23 Feb 2011 01:45:26 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 10:45:25 +0100 Message-ID: Subject: Re: [Qemu-devel] Re: QEMU regression problems - Update FPU From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Roy Tam , seabios@seabios.org, qemu-devel@nongnu.org, Kevin O'Connor , Gerhard Wiesinger , Aurelien Jarno On Wed, Feb 23, 2011 at 9:16 AM, Peter Maydell w= rote: > On 18 February 2011 07:12, Gerhard Wiesinger wrote: >> Issue 1.) with FPU still present >> I tracked down the problematic code and it is a rounding error from doub= le >> precision to 64bit floats: Any ideas how to fix such an issue in general= ? >> >> QEMU result in ST0: 0.42925860786976457 (wrong emulated) >> KVM result in ST0: =A00.42925860786975449 (correct) > > This is an error when running QEMU in TCG mode, right? > At the moment x86 is the odd-one-out in that it doesn't > use CONFIG_SOFTFLOAT for its FPU emulation, so somebody > has made an explicit choice of preferring speed over > accuracy, and I am unsurprised that there are rounding > errors as a result. Even if you were using SoftFloat, you'd probably still get wrong results given that this test seems to test trigonometric instructions which aren't implemented in SoftFloat, but are relying on libm. Laurent