summaryrefslogtreecommitdiff
path: root/qemu
diff options
context:
space:
mode:
authorths <ths>2007-09-11 10:04:57 +0000
committerths <ths>2007-09-11 10:04:57 +0000
commit16cca856b6821b81e824fb5cba757dcfb041ee20 (patch)
treeef1e53c0cfb495b05970faa685d51d889c655df6 /qemu
parentb66e675ac7c4274f1d1822c9d432b7e5602c8330 (diff)
Fix tb->size mishandling, by Daniel Jacobowitz.
Diffstat (limited to 'qemu')
-rw-r--r--qemu/target-alpha/translate.c1
-rw-r--r--qemu/target-arm/translate.c1
-rw-r--r--qemu/target-m68k/translate.c1
-rw-r--r--qemu/target-mips/translate.c8
-rw-r--r--qemu/target-ppc/translate.c1
-rw-r--r--qemu/target-sh4/translate.c1
-rw-r--r--qemu/target-sparc/translate.c1
7 files changed, 3 insertions, 11 deletions
diff --git a/qemu/target-alpha/translate.c b/qemu/target-alpha/translate.c
index 77e3b4ec..9ed53be2 100644
--- a/qemu/target-alpha/translate.c
+++ b/qemu/target-alpha/translate.c
@@ -2047,7 +2047,6 @@ int gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
} else {
tb->size = ctx.pc - pc_start;
}
diff --git a/qemu/target-arm/translate.c b/qemu/target-arm/translate.c
index 799aef2f..590959c2 100644
--- a/qemu/target-arm/translate.c
+++ b/qemu/target-arm/translate.c
@@ -3656,7 +3656,6 @@ static inline int gen_intermediate_code_internal(CPUState *env,
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
} else {
tb->size = dc->pc - pc_start;
}
diff --git a/qemu/target-m68k/translate.c b/qemu/target-m68k/translate.c
index 9fa46029..8adc9c36 100644
--- a/qemu/target-m68k/translate.c
+++ b/qemu/target-m68k/translate.c
@@ -3260,7 +3260,6 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
} else {
tb->size = dc->pc - pc_start;
}
diff --git a/qemu/target-mips/translate.c b/qemu/target-mips/translate.c
index c87f2c98..d7bb20af 100644
--- a/qemu/target-mips/translate.c
+++ b/qemu/target-mips/translate.c
@@ -5882,10 +5882,6 @@ static void decode_opc (CPUState *env, DisasContext *ctx)
generate_exception(ctx, EXCP_SYSCALL);
break;
case OPC_BREAK:
- /* XXX: Hack to work around wrong handling of self-modifying code. */
- ctx->pc += 4;
- save_cpu_state(ctx, 1);
- ctx->pc -= 4;
generate_exception(ctx, EXCP_BREAK);
break;
case OPC_SPIM:
@@ -6433,6 +6429,9 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
save_cpu_state(&ctx, 1);
ctx.bstate = BS_BRANCH;
gen_op_debug();
+ /* Include the breakpoint location or the tb won't
+ * be flushed when it must be. */
+ ctx.pc += 4;
goto done_generating;
}
}
@@ -6493,7 +6492,6 @@ done_generating:
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
} else {
tb->size = ctx.pc - pc_start;
}
diff --git a/qemu/target-ppc/translate.c b/qemu/target-ppc/translate.c
index e5064c08..40a1176c 100644
--- a/qemu/target-ppc/translate.c
+++ b/qemu/target-ppc/translate.c
@@ -5878,7 +5878,6 @@ static inline int gen_intermediate_code_internal (CPUState *env,
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
} else {
tb->size = ctx.nip - pc_start;
}
diff --git a/qemu/target-sh4/translate.c b/qemu/target-sh4/translate.c
index 67ef8395..5842c29d 100644
--- a/qemu/target-sh4/translate.c
+++ b/qemu/target-sh4/translate.c
@@ -1242,7 +1242,6 @@ gen_intermediate_code_internal(CPUState * env, TranslationBlock * tb,
ii++;
while (ii <= i)
gen_opc_instr_start[ii++] = 0;
- tb->size = 0;
} else {
tb->size = ctx.pc - pc_start;
}
diff --git a/qemu/target-sparc/translate.c b/qemu/target-sparc/translate.c
index 2b42ffd3..54b861a8 100644
--- a/qemu/target-sparc/translate.c
+++ b/qemu/target-sparc/translate.c
@@ -3365,7 +3365,6 @@ static inline int gen_intermediate_code_internal(TranslationBlock * tb,
lj++;
while (lj <= j)
gen_opc_instr_start[lj++] = 0;
- tb->size = 0;
#if 0
if (loglevel > 0) {
page_dump(logfile);