From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5168] ppc: Convert op_subf to TCG
Date: Fri, 05 Sep 2008 14:19:51 +0000 [thread overview]
Message-ID: <E1KbcAB-0007xa-O8@cvs.savannah.gnu.org> (raw)
Revision: 5168
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5168
Author: aurel32
Date: 2008-09-05 14:19:51 +0000 (Fri, 05 Sep 2008)
Log Message:
-----------
ppc: Convert op_subf to TCG
Replace op_subf with tcg_gen_sub_tl.
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-ppc/op.c
trunk/target-ppc/translate.c
Modified: trunk/target-ppc/op.c
===================================================================
--- trunk/target-ppc/op.c 2008-09-05 14:19:43 UTC (rev 5167)
+++ trunk/target-ppc/op.c 2008-09-05 14:19:51 UTC (rev 5168)
@@ -881,13 +881,6 @@
}
#endif
-/* subtract from */
-void OPPROTO op_subf (void)
-{
- T0 = T1 - T0;
- RETURN();
-}
-
/* subtract from carrying */
void OPPROTO op_check_subfc (void)
{
Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c 2008-09-05 14:19:43 UTC (rev 5167)
+++ trunk/target-ppc/translate.c 2008-09-05 14:19:51 UTC (rev 5168)
@@ -950,10 +950,14 @@
/* neg neg. nego nego. */
GEN_INT_ARITH1_64 (neg, 0x1F, 0x08, 0x03, PPC_INTEGER);
/* subf subf. subfo subfo. */
+static always_inline void gen_op_subf (void)
+{
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
+}
static always_inline void gen_op_subfo (void)
{
tcg_gen_not_tl(cpu_T[2], cpu_T[0]);
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_addo();
}
#if defined(TARGET_PPC64)
@@ -961,7 +965,7 @@
static always_inline void gen_op_subfo_64 (void)
{
tcg_gen_not_i64(cpu_T[2], cpu_T[0]);
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_addo_64();
}
#endif
@@ -969,26 +973,26 @@
/* subfc subfc. subfco subfco. */
static always_inline void gen_op_subfc (void)
{
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_subfc();
}
static always_inline void gen_op_subfco (void)
{
tcg_gen_not_tl(cpu_T[2], cpu_T[0]);
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_subfc();
gen_op_check_addo();
}
#if defined(TARGET_PPC64)
static always_inline void gen_op_subfc_64 (void)
{
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_subfc_64();
}
static always_inline void gen_op_subfco_64 (void)
{
tcg_gen_not_i64(cpu_T[2], cpu_T[0]);
- gen_op_subf();
+ tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
gen_op_check_subfc_64();
gen_op_check_addo_64();
}
reply other threads:[~2008-09-05 14:37 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=E1KbcAB-0007xa-O8@cvs.savannah.gnu.org \
--to=aurelien@aurel32.net \
--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).