From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTnfy-0007HA-BP for qemu-devel@nongnu.org; Wed, 12 Apr 2006 18:19:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTnfx-0007G5-K3 for qemu-devel@nongnu.org; Wed, 12 Apr 2006 18:19:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTnfx-0007Fv-FP for qemu-devel@nongnu.org; Wed, 12 Apr 2006 18:19:01 -0400 Received: from [84.96.92.56] (helo=smTp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTnl8-0006Ed-RE for qemu-devel@nongnu.org; Wed, 12 Apr 2006 18:24:22 -0400 Received: from [84.102.211.235] by sp604003mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0IXM00G5IRBO43U0@sp604003mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Thu, 13 Apr 2006 00:19:00 +0200 (CEST) Date: Thu, 13 Apr 2006 00:18:05 +0200 From: Fabrice Bellard Subject: Re: [Qemu-devel] Emulation differences, qemu-system-x86_64 vs Athlon64 In-reply-to: <200604121308.00848.jseward@acm.org> Message-id: <443D7C9D.8010401@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <200604121308.00848.jseward@acm.org> 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 Julian Seward wrote: > Recently I've been playing with CVS qemu-system (softmmu) on amd64 > and had some stability problems. I decided to run Valgrind's amd64 > instruction-set tests (derived from qemu's) to see if they picked up > anything. Resulting diffs are attached. > > There are a bunch of differences for the C flag for rotates > (rol/ror) by multiples of the word size. I don't think these > are significant, but who knows. This is a bug in QEMU. From the manuals, the C flag must be updated even if the resulting shift is zero. I just modified the QEMU tests to catch this problem (it is not x86_64 specific). > Perhaps more worryingly are the 20 or so lines at the bottom > of the diff. These I believe are for double-to-int/short > conversions for a value which is out of range for an int/short; > the hardware produces 0x80000000/0x8000 respectively, which is > the "integer indefinite"; QEMU produces zero. I can imagine some > obscure routine somewhere checking for integer indefinite after > conversion and being confused as a result. I guess the problem comes from the usage of lrintl() on x86_64 in fpu/softfloat-native.c, but I cannot test it yet. Fabrice.