Commit ce62e5ba authored by Thiemo Seufer's avatar Thiemo Seufer
Browse files

Fix tb->size mishandling, by Daniel Jacobowitz.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3160 c046a42c-6fe2-441c-8c8c-71466251a162
parent 408e7837
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
    }
+0 −1
Original line number Diff line number Diff line
@@ -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;
    }
+0 −1
Original line number Diff line number Diff line
@@ -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;
    }
+3 −5
Original line number Diff line number Diff line
@@ -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;
    }
+0 −1
Original line number Diff line number Diff line
@@ -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;
    }
Loading