From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/2] tcg/arm: Factor out code to emit immediate or reg-reg op
Date: Wed, 26 Sep 2012 12:01:03 -0700 [thread overview]
Message-ID: <506350EF.8010508@twiddle.net> (raw)
In-Reply-To: <1348685335-16770-2-git-send-email-peter.maydell@linaro.org>
On 09/26/2012 11:48 AM, Peter Maydell wrote:
> case INDEX_op_setcond_i32:
> - if (const_args[2]) {
> - int rot;
> - rot = encode_imm(args[2]);
> - tcg_out_dat_imm(s, COND_AL, ARITH_CMP, 0,
> - args[1], rotl(args[2], rot) | (rot << 7));
> - } else {
> - tcg_out_dat_reg(s, COND_AL, ARITH_CMP, 0,
> - args[1], args[2], SHIFT_IMM_LSL(0));
> - }
> + tcg_out_dat_rI(s, COND_AL, ARITH_CMP, 0,
> + args[1], args[2], const_args[2]);
> tcg_out_dat_imm(s, tcg_cond_to_arm_cond[args[3]],
> ARITH_MOV, args[0], 0, 1);
> tcg_out_dat_imm(s, tcg_cond_to_arm_cond[tcg_invert_cond(args[3])],
The patch itself is fine. But as a followup, if movcc is no longer "free",
then perhaps the setcond sequence is better as
cmp
mov
movcc
i.e. the second move is unconditional? A register renaming OOO core could
then schedule the mov before the cmp.
r~
next prev parent reply other threads:[~2012-09-26 19:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 18:48 [Qemu-devel] [PATCH 0/2] tcg/arm: Implement movcond_i32 Peter Maydell
2012-09-26 18:48 ` [Qemu-devel] [PATCH 1/2] tcg/arm: Factor out code to emit immediate or reg-reg op Peter Maydell
2012-09-26 19:01 ` Richard Henderson [this message]
2012-09-26 19:46 ` Peter Maydell
2012-09-27 13:01 ` Peter Maydell
2012-09-27 19:52 ` Aurelien Jarno
2012-09-26 18:48 ` [Qemu-devel] [PATCH 2/2] tcg/arm: Implement movcond_i32 Peter Maydell
2012-09-27 6:33 ` Paolo Bonzini
2012-09-27 14:32 ` Richard Henderson
2012-09-27 19:53 ` Aurelien Jarno
2012-10-12 17:07 ` [Qemu-devel] [PATCH 0/2] " Peter Maydell
2012-10-16 23:24 ` Aurelien Jarno
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=506350EF.8010508@twiddle.net \
--to=rth@twiddle.net \
--cc=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).