From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cx4Vp-0005hX-5i for qemu-devel@nongnu.org; Fri, 04 Feb 2005 09:32:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cx4Vn-0005gP-9T for qemu-devel@nongnu.org; Fri, 04 Feb 2005 09:32:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cx4Vn-0005g7-2A for qemu-devel@nongnu.org; Fri, 04 Feb 2005 09:32:43 -0500 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cx4Ix-0005SZ-Di for qemu-devel@nongnu.org; Fri, 04 Feb 2005 09:19:27 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Qemu arm emulation Date: Fri, 4 Feb 2005 14:19:23 +0000 References: <20041203210758.GD21652@cray.fish.zetnet.co.uk> <200502041330.47927.uli@suse.de> In-Reply-To: <200502041330.47927.uli@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502041419.24446.paul@codesourcery.com> 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 On Friday 04 February 2005 12:30, Ulrich Hecht wrote: > Hi! > > On Friday 03 December 2004 22:07, Charlie Baylis wrote: > > 2. Shifter carry out for immediates > > When an immediate value is generated the shifter carry out is set to > > bit31 of the resulting immediate if the shift value is non zero. If > > the shift value is zero, then the shifter carry out has the value of > > the C flag. > > > > Therefore, the following instructions should alter the carry flag when > > used with an immediate which has a non-zero shift. > > ANDS BICS EORS MOVS MVNS ORRS TEQS and TSTS > > (The remaining data processing instructions generate the C flag from > > the calculation performed by the instruction) > > Here's a patch that fixes the testcase. I made it for 0.6.1, but it still > applies and works for CVS. > +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. Paul