qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5142] [ppc] Convert op_reset_T0, op_set_{T0, T1} to TCG
Date: Tue, 02 Sep 2008 23:26:32 +0000	[thread overview]
Message-ID: <E1KafGa-0000R3-H9@cvs.savannah.gnu.org> (raw)

Revision: 5142
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5142
Author:   aurel32
Date:     2008-09-02 23:26:32 +0000 (Tue, 02 Sep 2008)

Log Message:
-----------
[ppc] Convert op_reset_T0, op_set_{T0, T1} to TCG

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-02 23:26:23 UTC (rev 5141)
+++ trunk/target-ppc/op.c	2008-09-02 23:26:32 UTC (rev 5142)
@@ -137,48 +137,6 @@
 }
 
 /* Constants load */
-void OPPROTO op_reset_T0 (void)
-{
-    T0 = 0;
-    RETURN();
-}
-
-void OPPROTO op_set_T0 (void)
-{
-    T0 = (uint32_t)PARAM1;
-    RETURN();
-}
-
-#if defined(TARGET_PPC64)
-void OPPROTO op_set_T0_64 (void)
-{
-    T0 = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
-    RETURN();
-}
-#endif
-
-void OPPROTO op_set_T1 (void)
-{
-    T1 = (uint32_t)PARAM1;
-    RETURN();
-}
-
-#if defined(TARGET_PPC64)
-void OPPROTO op_set_T1_64 (void)
-{
-    T1 = ((uint64_t)PARAM1 << 32) | (uint64_t)PARAM2;
-    RETURN();
-}
-#endif
-
-#if 0 // unused
-void OPPROTO op_set_T2 (void)
-{
-    T2 = (uint32_t)PARAM1;
-    RETURN();
-}
-#endif
-
 void OPPROTO op_moven_T2_T0 (void)
 {
     T2 = ~T0;

Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c	2008-09-02 23:26:23 UTC (rev 5141)
+++ trunk/target-ppc/translate.c	2008-09-02 23:26:32 UTC (rev 5142)
@@ -1292,7 +1292,7 @@
         gen_op_load_gpr_T1(rB(ctx->opcode));
         gen_op_xor();
     } else {
-        gen_op_reset_T0();
+        tcg_gen_movi_tl(cpu_T[0], 0);
     }
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -2108,7 +2108,7 @@
 static always_inline void gen_addr_register (DisasContext *ctx)
 {
     if (rA(ctx->opcode) == 0) {
-        gen_op_reset_T0();
+        tcg_gen_movi_tl(cpu_T[0], 0);
     } else {
         gen_op_load_gpr_T0(rA(ctx->opcode));
     }
@@ -2518,7 +2518,7 @@
     /* NIP cannot be restored if the memory exception comes from an helper */
     gen_update_nip(ctx, ctx->nip - 4);
     gen_addr_register(ctx);
-    gen_op_set_T1(nb);
+    tcg_gen_movi_tl(cpu_T[1], nb);
     op_ldsts(lswi, start);
 }
 
@@ -2548,7 +2548,7 @@
     gen_addr_register(ctx);
     if (nb == 0)
         nb = 32;
-    gen_op_set_T1(nb);
+    tcg_gen_movi_tl(cpu_T[1], nb);
     op_ldsts(stsw, rS(ctx->opcode));
 }
 
@@ -3612,7 +3612,7 @@
         GEN_EXCP_PRIVREG(ctx);
         return;
     }
-    gen_op_set_T1(SR(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SR(ctx->opcode));
     gen_op_load_sr();
     gen_op_store_T0_gpr(rD(ctx->opcode));
 #endif
@@ -3646,7 +3646,7 @@
         return;
     }
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SR(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SR(ctx->opcode));
     gen_op_store_sr();
 #endif
 }
@@ -3680,7 +3680,7 @@
         GEN_EXCP_PRIVREG(ctx);
         return;
     }
-    gen_op_set_T1(SR(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SR(ctx->opcode));
     gen_op_load_slb();
     gen_op_store_T0_gpr(rD(ctx->opcode));
 #endif
@@ -3715,7 +3715,7 @@
         return;
     }
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SR(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SR(ctx->opcode));
     gen_op_store_slb();
 #endif
 }
@@ -3952,7 +3952,7 @@
 GEN_HANDLER(dozi, 0x09, 0xFF, 0xFF, 0x00000000, PPC_POWER_BR)
 {
     gen_op_load_gpr_T0(rA(ctx->opcode));
-    gen_op_set_T1(SIMM(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SIMM(ctx->opcode));
     gen_op_POWER_doz();
     gen_op_store_T0_gpr(rD(ctx->opcode));
 }
@@ -4117,7 +4117,7 @@
 GEN_HANDLER(sliq, 0x1F, 0x18, 0x05, 0x00000000, PPC_POWER_BR)
 {
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SH(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SH(ctx->opcode));
     gen_op_POWER_sle();
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -4128,7 +4128,7 @@
 GEN_HANDLER(slliq, 0x1F, 0x18, 0x07, 0x00000000, PPC_POWER_BR)
 {
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SH(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SH(ctx->opcode));
     gen_op_POWER_sleq();
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -4161,7 +4161,7 @@
 GEN_HANDLER(sraiq, 0x1F, 0x18, 0x1D, 0x00000000, PPC_POWER_BR)
 {
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SH(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SH(ctx->opcode));
     gen_op_POWER_sraq();
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -4216,7 +4216,7 @@
 GEN_HANDLER(sriq, 0x1F, 0x18, 0x15, 0x00000000, PPC_POWER_BR)
 {
     gen_op_load_gpr_T0(rS(ctx->opcode));
-    gen_op_set_T1(SH(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SH(ctx->opcode));
     gen_op_POWER_srq();
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -4228,7 +4228,7 @@
 {
     gen_op_load_gpr_T0(rS(ctx->opcode));
     gen_op_load_gpr_T1(rB(ctx->opcode));
-    gen_op_set_T1(SH(ctx->opcode));
+    tcg_gen_movi_tl(cpu_T[1], SH(ctx->opcode));
     gen_op_POWER_srlq();
     gen_op_store_T0_gpr(rA(ctx->opcode));
     if (unlikely(Rc(ctx->opcode) != 0))
@@ -4776,7 +4776,7 @@
         GEN_EXCP_PRIVREG(ctx);
         return;
     }
-    gen_op_set_T0(dcrn);
+    tcg_gen_movi_tl(cpu_T[0], dcrn);
     gen_op_load_dcr();
     gen_op_store_T0_gpr(rD(ctx->opcode));
 #endif
@@ -4794,7 +4794,7 @@
         GEN_EXCP_PRIVREG(ctx);
         return;
     }
-    gen_op_set_T0(dcrn);
+    tcg_gen_movi_tl(cpu_T[0], dcrn);
     gen_op_load_gpr_T1(rS(ctx->opcode));
     gen_op_store_dcr();
 #endif
@@ -5158,7 +5158,7 @@
         GEN_EXCP_PRIVOPC(ctx);
         return;
     }
-    gen_op_set_T0(ctx->opcode & 0x00010000);
+    tcg_gen_movi_tl(cpu_T[0], ctx->opcode & 0x00010000);
     gen_op_wrte();
     /* Stop translation to have a chance to raise an exception
      * if we just set msr_ee to 1

                 reply	other threads:[~2008-09-02 23:26 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=E1KafGa-0000R3-H9@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).