From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CwMrv-00017z-PZ for qemu-devel@nongnu.org; Wed, 02 Feb 2005 10:56:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CwMrs-00016V-6q for qemu-devel@nongnu.org; Wed, 02 Feb 2005 10:56:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwMrr-00015d-5v for qemu-devel@nongnu.org; Wed, 02 Feb 2005 10:56:35 -0500 Received: from [62.241.163.6] (helo=astro.systems.pipex.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CwMdU-0002kW-LD for qemu-devel@nongnu.org; Wed, 02 Feb 2005 10:41:47 -0500 Received: from nowt.org (81-178-148-105.dsl.pipex.com [81.178.148.105]) by astro.systems.pipex.net (Postfix) with ESMTP id 11472E000482 for ; Wed, 2 Feb 2005 15:41:27 +0000 (GMT) Received: from wren.home (wren.home [192.168.1.7]) by nowt.org (Postfix) with ESMTP id 524BE2413F for ; Wed, 2 Feb 2005 15:41:27 +0000 (GMT) From: Paul Brook Date: Wed, 2 Feb 2005 15:41:26 +0000 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_mSPACAP190tbMWl" Message-Id: <200502021541.26579.paul@nowt.org> Subject: [Qemu-devel] Arm sbcs bugfix 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 --Boundary-00=_mSPACAP190tbMWl Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline The logic for setting CF in the arm sbcs instruction was wrong. The attached patch fixes it. Found while testing some soft-float code. Paul --Boundary-00=_mSPACAP190tbMWl Content-Type: text/x-diff; charset="us-ascii"; name="patch.qemu_sbcs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch.qemu_sbcs" Index: target-arm/op.c =================================================================== RCS file: /cvsroot/qemu/qemu/target-arm/op.c,v retrieving revision 1.6 diff -u -p -r1.6 op.c --- target-arm/op.c 31 Jan 2005 20:43:28 -0000 1.6 +++ target-arm/op.c 2 Feb 2005 15:25:49 -0000 @@ -190,10 +190,10 @@ void OPPROTO op_ ## sbc ## l_T0_T1_cc(vo src1 = T0; \ if (!env->CF) { \ T0 = T0 - T1 - 1; \ - env->CF = src1 >= T1; \ + env->CF = src1 > T1; \ } else { \ T0 = T0 - T1; \ - env->CF = src1 > T1; \ + env->CF = src1 >= T1; \ } \ env->VF = (src1 ^ T1) & (src1 ^ T0); \ env->NZF = T0; \ --Boundary-00=_mSPACAP190tbMWl--