From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxPy1-0002Ci-75 for qemu-devel@nongnu.org; Sat, 05 Feb 2005 08:27:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxPxr-00028x-Aq for qemu-devel@nongnu.org; Sat, 05 Feb 2005 08:27:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxPxo-00021d-T0 for qemu-devel@nongnu.org; Sat, 05 Feb 2005 08:27:05 -0500 Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CxPK1-000328-85 for qemu-devel@nongnu.org; Sat, 05 Feb 2005 07:45:57 -0500 From: Ulrich Hecht Subject: Re: [Qemu-devel] Qemu arm emulation Date: Sat, 5 Feb 2005 13:45:11 +0100 References: <20041203210758.GD21652@cray.fish.zetnet.co.uk> <200502041330.47927.uli@suse.de> <200502041419.24446.paul@codesourcery.com> In-Reply-To: <200502041419.24446.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_X/LBCQoEybznGWy" Message-Id: <200502051345.11450.uli@suse.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org --Boundary-00=_X/LBCQoEybznGWy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! On Friday 04 February 2005 15:19, Paul Brook wrote: > On Friday 04 February 2005 12:30, Ulrich Hecht wrote: > > +void OPPROTO op_movl_T1_im_cc(void) > > +{ > > + T1 = PARAM1; > > + env->CF = PARAM1 >> 31; > > +} > > This should be "((uint32_t) PARAM1) >> 31". > The comments say CF is 0 or 1. PARAM1 is signed, so your code will > result in 0 or -1 on 32-bit hosts. > > > /* XXX: is CF modified ? */ > > Probably want to remove this comment now. OK. CU Uli --Boundary-00=_X/LBCQoEybznGWy Content-Type: text/x-diff; charset="iso-8859-1"; name="qemu-shifter_carry.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qemu-shifter_carry.patch" Index: target-arm/op.c =================================================================== RCS file: /cvsroot/qemu/qemu/target-arm/op.c,v retrieving revision 1.7 diff -u -r1.7 op.c --- target-arm/op.c 2 Feb 2005 20:43:01 -0000 1.7 +++ target-arm/op.c 4 Feb 2005 14:24:39 -0000 @@ -105,6 +105,12 @@ T1 = PARAM1; } +void OPPROTO op_movl_T1_im_cc(void) +{ + T1 = PARAM1; + env->CF = ((uint32_t)PARAM1) >> 31; +} + void OPPROTO op_movl_T2_im(void) { T2 = PARAM1; Index: target-arm/translate.c =================================================================== RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v retrieving revision 1.15 diff -u -r1.15 translate.c --- target-arm/translate.c 31 Jan 2005 20:43:28 -0000 1.15 +++ target-arm/translate.c 4 Feb 2005 14:24:39 -0000 @@ -535,8 +535,10 @@ shift = ((insn >> 8) & 0xf) * 2; if (shift) val = (val >> shift) | (val << (32 - shift)); - gen_op_movl_T1_im(val); - /* XXX: is CF modified ? */ + if (logic_cc && shift) + gen_op_movl_T1_im_cc(val); + else + gen_op_movl_T1_im(val); } else { /* register */ rm = (insn) & 0xf; --Boundary-00=_X/LBCQoEybznGWy--