From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4506] Switch MIPS movn/movz to TCG.
Date: Wed, 21 May 2008 02:02:40 +0000 [thread overview]
Message-ID: <E1Jydf6-0000U6-6P@cvs.savannah.gnu.org> (raw)
Revision: 4506
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4506
Author: ths
Date: 2008-05-21 02:02:39 +0000 (Wed, 21 May 2008)
Log Message:
-----------
Switch MIPS movn/movz to TCG.
Modified Paths:
--------------
trunk/target-mips/op.c
trunk/target-mips/translate.c
Modified: trunk/target-mips/op.c
===================================================================
--- trunk/target-mips/op.c 2008-05-20 19:36:22 UTC (rev 4505)
+++ trunk/target-mips/op.c 2008-05-21 02:02:39 UTC (rev 4506)
@@ -510,20 +510,6 @@
#endif
/* Conditional moves */
-void op_movn (void)
-{
- if (T1 != 0)
- env->gpr[env->current_tc][PARAM1] = T0;
- FORCE_RET();
-}
-
-void op_movz (void)
-{
- if (T1 == 0)
- env->gpr[env->current_tc][PARAM1] = T0;
- FORCE_RET();
-}
-
void op_movf (void)
{
if (!(env->fpu->fcr31 & PARAM1))
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2008-05-20 19:36:22 UTC (rev 4505)
+++ trunk/target-mips/translate.c 2008-05-21 02:02:39 UTC (rev 4506)
@@ -1707,11 +1707,23 @@
opn = "mul";
break;
case OPC_MOVN:
- gen_op_movn(rd);
+ {
+ int l1 = gen_new_label();
+
+ tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[1], tcg_const_tl(0), l1);
+ gen_op_store_gpr_T0(rd);
+ gen_set_label(l1);
+ }
opn = "movn";
goto print;
case OPC_MOVZ:
- gen_op_movz(rd);
+ {
+ int l1 = gen_new_label();
+
+ tcg_gen_brcond_tl(TCG_COND_NE, cpu_T[1], tcg_const_tl(0), l1);
+ gen_op_store_gpr_T0(rd);
+ gen_set_label(l1);
+ }
opn = "movz";
goto print;
case OPC_SLLV:
reply other threads:[~2008-05-21 2:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1Jydf6-0000U6-6P@cvs.savannah.gnu.org \
--to=ths@networkno.de \
--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).