From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH 2/4] tcg/arm: implement setcond
Date: Mon, 1 Mar 2010 22:33:48 +0100 [thread overview]
Message-ID: <1267479230-1964-3-git-send-email-aurelien@aurel32.net> (raw)
In-Reply-To: <1267479230-1964-1-git-send-email-aurelien@aurel32.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
tcg/arm/tcg-target.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index 7bdfda9..9a76ecb 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1531,6 +1531,14 @@ static inline void tcg_out_op(TCGContext *s, int opc,
args[0], args[2], SHIFT_IMM_LSL(0));
tcg_out_goto_label(s, tcg_cond_to_arm_cond[args[4]], args[5]);
break;
+ case INDEX_op_setcond_i32:
+ tcg_out_dat_reg(s, COND_AL, ARITH_CMP, 0,
+ args[1], args[2], SHIFT_IMM_LSL(0));
+ 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])],
+ ARITH_MOV, args[0], 0, 0);
+ break;
case INDEX_op_qemu_ld8u:
tcg_out_qemu_ld(s, COND_AL, args, 0);
@@ -1629,6 +1637,7 @@ static const TCGTargetOpDef arm_op_defs[] = {
{ INDEX_op_sar_i32, { "r", "r", "ri" } },
{ INDEX_op_brcond_i32, { "r", "r" } },
+ { INDEX_op_setcond_i32, { "r", "r", "r" } },
/* TODO: "r", "r", "r", "r", "ri", "ri" */
{ INDEX_op_add2_i32, { "r", "r", "r", "r", "r", "r" } },
--
1.7.0
next prev parent reply other threads:[~2010-03-01 21:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 21:33 [Qemu-devel] tcg/arm fixes and improvements Aurelien Jarno
2010-03-01 21:33 ` [Qemu-devel] [PATCH 1/4] tcg/arm: fix div2/divu2 Aurelien Jarno
2010-03-01 21:33 ` Aurelien Jarno [this message]
2010-03-01 21:33 ` [Qemu-devel] [PATCH 3/4] tcg/arm: implement setcond2 Aurelien Jarno
2010-03-01 21:33 ` [Qemu-devel] [PATCH 4/4] tcg/arm: accept immediate arguments for brcond/setcond Aurelien Jarno
2010-03-02 21:44 ` [Qemu-devel] tcg/arm fixes and improvements andrzej zaborowski
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=1267479230-1964-3-git-send-email-aurelien@aurel32.net \
--to=aurelien@aurel32.net \
--cc=andrew.zaborowski@intel.com \
--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).