All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4670] Free constant temporaries.
Date: Thu, 05 Jun 2008 08:38:45 +0000	[thread overview]
Message-ID: <E1K4Azd-0000Ly-FB@cvs.savannah.gnu.org> (raw)

Revision: 4670
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4670
Author:   ths
Date:     2008-06-05 08:38:44 +0000 (Thu, 05 Jun 2008)

Log Message:
-----------
Free constant temporaries.

Modified Paths:
--------------
    trunk/target-mips/translate.c

Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c	2008-06-04 18:29:25 UTC (rev 4669)
+++ trunk/target-mips/translate.c	2008-06-05 08:38:44 UTC (rev 4670)
@@ -425,6 +425,24 @@
 /* global register indices */
 static TCGv cpu_env, current_tc_gprs, current_tc_hi, cpu_T[2];
 
+static inline void tcg_gen_helper_0_1i(void *func, TCGv arg)
+{
+    TCGv t = tcg_const_i32(arg);
+
+    tcg_gen_helper_0_1(func, t);
+    tcg_temp_free(t);
+}
+
+static inline void tcg_gen_helper_0_2ii(void *func, TCGv arg1, TCGv arg2)
+{
+    TCGv t1 = tcg_const_i32(arg1);
+    TCGv t2 = tcg_const_i32(arg2);
+
+    tcg_gen_helper_0_2(func, t1, t2);
+    tcg_temp_free(t1);
+    tcg_temp_free(t2);
+}
+
 typedef struct DisasContext {
     struct TranslationBlock *tb;
     target_ulong pc, saved_pc;
@@ -797,7 +815,7 @@
 generate_exception_err (DisasContext *ctx, int excp, int err)
 {
     save_cpu_state(ctx, 1);
-    tcg_gen_helper_0_2(do_raise_exception_err, tcg_const_i32(excp), tcg_const_i32(err));
+    tcg_gen_helper_0_2ii(do_raise_exception_err, excp, err);
     tcg_gen_helper_0_0(do_interrupt_restart);
     tcg_gen_exit_tb(0);
 }
@@ -806,7 +824,7 @@
 generate_exception (DisasContext *ctx, int excp)
 {
     save_cpu_state(ctx, 1);
-    tcg_gen_helper_0_1(do_raise_exception, tcg_const_i32(excp));
+    tcg_gen_helper_0_1i(do_raise_exception, excp);
     tcg_gen_helper_0_0(do_interrupt_restart);
     tcg_gen_exit_tb(0);
 }

                 reply	other threads:[~2008-06-05  8:38 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=E1K4Azd-0000Ly-FB@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.