Commit ce62e5ba096920a82b47c9ba62f35573bd61f546
1 parent
408e7837
Fix tb->size mishandling, by Daniel Jacobowitz.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3160 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
7 changed files
with
3 additions
and
11 deletions
target-alpha/translate.c
target-arm/translate.c
target-m68k/translate.c
target-mips/translate.c
| ... | ... | @@ -5882,10 +5882,6 @@ static void decode_opc (CPUState *env, DisasContext *ctx) |
| 5882 | 5882 | generate_exception(ctx, EXCP_SYSCALL); |
| 5883 | 5883 | break; |
| 5884 | 5884 | case OPC_BREAK: |
| 5885 | - /* XXX: Hack to work around wrong handling of self-modifying code. */ | |
| 5886 | - ctx->pc += 4; | |
| 5887 | - save_cpu_state(ctx, 1); | |
| 5888 | - ctx->pc -= 4; | |
| 5889 | 5885 | generate_exception(ctx, EXCP_BREAK); |
| 5890 | 5886 | break; |
| 5891 | 5887 | case OPC_SPIM: |
| ... | ... | @@ -6433,6 +6429,9 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb, |
| 6433 | 6429 | save_cpu_state(&ctx, 1); |
| 6434 | 6430 | ctx.bstate = BS_BRANCH; |
| 6435 | 6431 | gen_op_debug(); |
| 6432 | + /* Include the breakpoint location or the tb won't | |
| 6433 | + * be flushed when it must be. */ | |
| 6434 | + ctx.pc += 4; | |
| 6436 | 6435 | goto done_generating; |
| 6437 | 6436 | } |
| 6438 | 6437 | } |
| ... | ... | @@ -6493,7 +6492,6 @@ done_generating: |
| 6493 | 6492 | lj++; |
| 6494 | 6493 | while (lj <= j) |
| 6495 | 6494 | gen_opc_instr_start[lj++] = 0; |
| 6496 | - tb->size = 0; | |
| 6497 | 6495 | } else { |
| 6498 | 6496 | tb->size = ctx.pc - pc_start; |
| 6499 | 6497 | } | ... | ... |
target-ppc/translate.c
target-sh4/translate.c
target-sparc/translate.c