From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYJRr-0003MK-2Q for qemu-devel@nongnu.org; Mon, 02 Apr 2007 06:07:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYJRp-0003M0-PY for qemu-devel@nongnu.org; Mon, 02 Apr 2007 06:07:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYJRp-0003Lx-G1 for qemu-devel@nongnu.org; Mon, 02 Apr 2007 06:07:37 -0400 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HYJOn-00038I-Km for qemu-devel@nongnu.org; Mon, 02 Apr 2007 06:04:29 -0400 Received: from anguille.univ-lyon1.fr ([134.214.4.207]) by mail.aurel32.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HYJOm-0001Xl-1C for qemu-devel@nongnu.org; Mon, 02 Apr 2007 12:04:28 +0200 Message-ID: <4610D521.7060704@aurel32.net> Date: Mon, 02 Apr 2007 12:04:17 +0200 From: Aurelien Jarno MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR when shift==0 References: <1171210865.20672.12.camel@localhost> In-Reply-To: <1171210865.20672.12.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 Matthew Howkins a écrit : > There is a bug in the ARM emulation of data-processing instructions with > ASR when the shift==0. The current QEMU CVS incorrectly modifies > the C-flag, when it should be preserved. > > The attached patch corrects this. > This patch is consistent with the reference manual, I think it should be applied. Has it been lost? > ------------------------------------------------------------------------ > > Index: target-arm/op.c > =================================================================== > RCS file: /sources/qemu/qemu/target-arm/op.c,v > retrieving revision 1.21 > diff -u -r1.21 op.c > --- target-arm/op.c 26 Jun 2006 19:55:19 -0000 1.21 > +++ target-arm/op.c 11 Feb 2007 16:08:22 -0000 > @@ -667,7 +667,7 @@ > if (shift >= 32) { > env->CF = (T1 >> 31) & 1; > T1 = (int32_t)T1 >> 31; > - } else { > + } else if (shift != 0) { > env->CF = (T1 >> (shift - 1)) & 1; > T1 = (int32_t)T1 >> shift; > } > > > ------------------------------------------------------------------------ > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net