Received: from [140.186.70.92] (port=33360 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwMVX-0004gC-JW for qemu-devel@nongnu.org; Sun, 06 Mar 2011 17:33:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwMVS-0005iJ-0h for qemu-devel@nongnu.org; Sun, 06 Mar 2011 17:32:54 -0500 Received: from hall.aurel32.net ([88.191.126.93]:37484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwMVR-0005iA-Q6 for qemu-devel@nongnu.org; Sun, 06 Mar 2011 17:32:53 -0500 Date: Sun, 6 Mar 2011 23:32:50 +0100 From: Aurelien Jarno Message-ID: <20110306223250.GA20806@volta.aurel32.net> References: <1299443529-13209-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1299443529-13209-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] Re: [PATCH v2] target-arm: Set carry flag correctly for Thumb2 ORNS List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Sun, Mar 06, 2011 at 08:32:09PM +0000, Peter Maydell wrote: > The code for Thumb2 ORNS (or negated and set flags) was trashing > a TCG input register which was needed later for use in calculating > flags, with the effect that the carry flag was always set with > the wrong sense. Fix this by using the TCG orc op instead of > separate not and or ops. > > Signed-off-by: Peter Maydell > --- > Change from v1: use orc as suggested by Aurelien > > target-arm/translate.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) Thanks, applied. > diff --git a/target-arm/translate.c b/target-arm/translate.c > index dbd958b..dd56ac6 100644 > --- a/target-arm/translate.c > +++ b/target-arm/translate.c > @@ -7326,8 +7326,7 @@ gen_thumb2_data_op(DisasContext *s, int op, int conds, uint32_t shifter_out, TCG > logic_cc = conds; > break; > case 3: /* orn */ > - tcg_gen_not_i32(t1, t1); > - tcg_gen_or_i32(t0, t0, t1); > + tcg_gen_orc_i32(t0, t0, t1); > logic_cc = conds; > break; > case 4: /* eor */ > -- > 1.7.1 > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net