qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4670] Free constant temporaries.
@ 2008-06-05  8:38 Thiemo Seufer
  0 siblings, 0 replies; only message in thread
From: Thiemo Seufer @ 2008-06-05  8:38 UTC (permalink / raw)
  To: qemu-devel

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);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-05  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05  8:38 [Qemu-devel] [4670] Free constant temporaries Thiemo Seufer

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).