From: Thiemo Seufer <ths@networkno.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4495] Fix local register cache handling.
Date: Sun, 18 May 2008 22:15:13 +0000 [thread overview]
Message-ID: <E1Jxr9t-0005gq-D2@cvs.savannah.gnu.org> (raw)
Revision: 4495
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4495
Author: ths
Date: 2008-05-18 22:15:12 +0000 (Sun, 18 May 2008)
Log Message:
-----------
Fix local register cache handling.
Modified Paths:
--------------
trunk/target-mips/translate.c
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2008-05-18 19:28:26 UTC (rev 4494)
+++ trunk/target-mips/translate.c 2008-05-18 22:15:12 UTC (rev 4495)
@@ -504,7 +504,7 @@
/* Moves to/from shadow registers */
static inline void gen_op_load_srsgpr_T0(int reg)
{
- int r_tmp = new_tmp();
+ TCGv r_tmp = new_tmp();
tcg_gen_ld_i32(r_tmp, cpu_env, offsetof(CPUState, CP0_SRSCtl));
tcg_gen_shri_i32(r_tmp, r_tmp, CP0SRSCtl_PSS);
@@ -518,7 +518,7 @@
static inline void gen_op_store_srsgpr_T0(int reg)
{
- int r_tmp = new_tmp();
+ TCGv r_tmp = new_tmp();
tcg_gen_ld_i32(r_tmp, cpu_env, offsetof(CPUState, CP0_SRSCtl));
tcg_gen_shri_i32(r_tmp, r_tmp, CP0SRSCtl_PSS);
@@ -1016,7 +1016,7 @@
#define OP_ST_ATOMIC(insn,fname,almask) \
void inline op_ldst_##insn(DisasContext *ctx) \
{ \
- int r_tmp = tcg_temp_new(TCG_TYPE_TL); \
+ TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); \
int l1 = gen_new_label(); \
int l2 = gen_new_label(); \
int l3 = gen_new_label(); \
@@ -1956,7 +1956,7 @@
static inline void tcg_gen_jnz_bcond(int label)
{
- int r_tmp = tcg_temp_new(TCG_TYPE_TL);
+ TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL);
tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, bcond));
tcg_gen_brcond_tl(TCG_COND_NE, r_tmp, tcg_const_tl(0), label);
@@ -6834,6 +6834,9 @@
if (search_pc && loglevel)
fprintf (logfile, "search pc %d\n", search_pc);
+ num_temps = 0;
+ memset(temps, 0, sizeof(temps));
+
pc_start = tb->pc;
gen_opc_end = gen_opc_buf + OPC_MAX_SIZE;
ctx.pc = pc_start;
@@ -6888,6 +6891,12 @@
}
ctx.opcode = ldl_code(ctx.pc);
decode_opc(env, &ctx);
+ if (num_temps) {
+ fprintf(stderr,
+ "Internal resource leak before " TARGET_FMT_lx "\n",
+ ctx.pc);
+ num_temps = 0;
+ }
ctx.pc += 4;
if (env->singlestep_enabled)
reply other threads:[~2008-05-18 22:15 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=E1Jxr9t-0005gq-D2@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 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).