diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2017-10-13 10:50:02 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2017-10-24 13:53:41 -0700 |
commit | 9b990ee5a3cc6aa38f81266fb0c6ef37a36c45b9 (patch) | |
tree | ed59ca42a7bfa9d7bac6785f2ad2852d2ef919f9 /exec.c | |
parent | 4e2ca83e71b51577b06b1468e836556912bd5b6e (diff) | |
download | qemu-9b990ee5a3cc6aa38f81266fb0c6ef37a36c45b9.zip qemu-9b990ee5a3cc6aa38f81266fb0c6ef37a36c45b9.tar.gz qemu-9b990ee5a3cc6aa38f81266fb0c6ef37a36c45b9.tar.bz2 |
tcg: Add CPUState cflags_next_tb
We were generating code during tb_invalidate_phys_page_range,
check_watchpoint, cpu_io_recompile, and (seemingly) discarding
the TB, assuming that it would magically be picked up during
the next iteration through the cpu_exec loop.
Instead, record the desired cflags in CPUState so that we request
the proper TB so that there is no more magic.
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -2431,11 +2431,8 @@ static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags) { CPUState *cpu = current_cpu; CPUClass *cc = CPU_GET_CLASS(cpu); - CPUArchState *env = cpu->env_ptr; - target_ulong pc, cs_base; target_ulong vaddr; CPUWatchpoint *wp; - uint32_t cpu_flags; assert(tcg_enabled()); if (cpu->watchpoint_hit) { @@ -2475,8 +2472,8 @@ static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags) cpu->exception_index = EXCP_DEBUG; cpu_loop_exit(cpu); } else { - cpu_get_tb_cpu_state(env, &pc, &cs_base, &cpu_flags); - tb_gen_code(cpu, pc, cs_base, cpu_flags, 1 | curr_cflags()); + /* Force execution of one insn next time. */ + cpu->cflags_next_tb = 1 | curr_cflags(); cpu_loop_exit_noexc(cpu); } } |