qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5673] target-mips: fix temporary variable freeing in op_ldst_##insn()
@ 2008-11-11 11:34 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-11-11 11:34 UTC (permalink / raw)
  To: qemu-devel

Revision: 5673
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5673
Author:   aurel32
Date:     2008-11-11 11:34:30 +0000 (Tue, 11 Nov 2008)

Log Message:
-----------
target-mips: fix temporary variable freeing in op_ldst_##insn()

Move tcg_temp_free() out of the conditional part to make sure
the TCG temporary variable is freed in all cases.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Thiemo Seufer <ths@networkno.de>

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

Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c	2008-11-11 11:30:48 UTC (rev 5672)
+++ trunk/target-mips/translate.c	2008-11-11 11:34:30 UTC (rev 5673)
@@ -1045,13 +1045,13 @@
     gen_set_label(l1);                                                  \
     tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, CP0_LLAddr));      \
     tcg_gen_brcond_tl(TCG_COND_NE, t0, r_tmp, l2);                      \
-    tcg_temp_free(r_tmp);                                               \
     tcg_gen_qemu_##fname(t1, t0, ctx->mem_idx);                         \
     tcg_gen_movi_tl(t0, 1);                                             \
     tcg_gen_br(l3);                                                     \
     gen_set_label(l2);                                                  \
     tcg_gen_movi_tl(t0, 0);                                             \
     gen_set_label(l3);                                                  \
+    tcg_temp_free(r_tmp);                                               \
 }
 OP_ST_ATOMIC(sc,st32,0x3);
 #if defined(TARGET_MIPS64)

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

only message in thread, other threads:[~2008-11-11 11:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 11:34 [Qemu-devel] [5673] target-mips: fix temporary variable freeing in op_ldst_##insn() Aurelien Jarno

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