From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: [Qemu-devel] Re: [PATCH v2] target-arm: Set carry flag correctly for Thumb2 ORNS
Date: Sun, 6 Mar 2011 23:32:50 +0100 [thread overview]
Message-ID: <20110306223250.GA20806@volta.aurel32.net> (raw)
In-Reply-To: <1299443529-13209-1-git-send-email-peter.maydell@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 <peter.maydell@linaro.org>
> ---
> 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
prev parent reply other threads:[~2011-03-06 22:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 20:32 [Qemu-devel] [PATCH v2] target-arm: Set carry flag correctly for Thumb2 ORNS Peter Maydell
2011-03-06 22:32 ` Aurelien Jarno [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110306223250.GA20806@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).