From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FT0tm-0005Zh-D0 for qemu-devel@nongnu.org; Mon, 10 Apr 2006 14:14:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FT0tk-0005Yv-KR for qemu-devel@nongnu.org; Mon, 10 Apr 2006 14:14:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FT0tk-0005Yq-Eh for qemu-devel@nongnu.org; Mon, 10 Apr 2006 14:14:00 -0400 Received: from [65.74.133.6] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FT0yR-000135-0W for qemu-devel@nongnu.org; Mon, 10 Apr 2006 14:18:51 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flag update inaddxcc and subxc Date: Mon, 10 Apr 2006 19:13:54 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604101913.56210.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 Monday 10 April 2006 19:04, Blue Swirl wrote: > >Doesn't this condition in addx and the corresponding line in subx need > >similar > >treatment? > > They don't change the flags. It certainly look like they do. In particular if TARGET_SPARC64 we have if ((T0 & 0xffffffff) < (src1 & 0xffffffff)) env->psr |= PSR_CARRY; But if !TARGET_SPARC64 we have - if (T0 < src1) + if (T0 < src1 || (has_carry && T0 <= src1)) env->psr |= PSR_CARRY; I'd expect these two to be the same (modulo the explicit truncation in the first case). Paul