From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSBub-0006Ux-Ms for qemu-devel@nongnu.org; Sun, 01 May 2005 06:42:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSBua-0006Ug-Kd for qemu-devel@nongnu.org; Sun, 01 May 2005 06:42:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSBua-00066D-0W for qemu-devel@nongnu.org; Sun, 01 May 2005 06:42:56 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DSBrt-0003rE-19 for qemu-devel@nongnu.org; Sun, 01 May 2005 06:40:09 -0400 From: Paul Brook Date: Sun, 1 May 2005 11:35:40 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505011135.41163.paul@codesourcery.com> Subject: [Qemu-devel] [patch] Bug in arm saturating instructions 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 Cc: TAKAGO Daisuke The patch below fixes a but in the arm saturating add/subtract instructions. We were writing the result back to the wrong register. Paul Index: target-arm/translate.c =================================================================== RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v retrieving revision 1.24 diff -u -p -r1.24 translate.c --- target-arm/translate.c 27 Apr 2005 20:25:20 -0000 1.24 +++ target-arm/translate.c 1 May 2005 10:28:46 -0000 @@ -1032,7 +1032,7 @@ static void disas_arm_insn(CPUState * en gen_op_subl_T0_T1_saturate(); else gen_op_addl_T0_T1_saturate(); - gen_movl_reg_T0(s, rn); + gen_movl_reg_T0(s, rd); break; case 0x8: /* signed multiply */ case 0xa: