summaryrefslogtreecommitdiffstats
path: root/target/mips
diff options
context:
space:
mode:
authorRichard Henderson2021-07-20 02:04:32 +0200
committerRichard Henderson2021-10-16 01:39:14 +0200
commit1a79c413999e241bbc24487b4db08faec2493c9d (patch)
treee10bdbb2080799ba68ca717f4f8dd61bffd16268 /target/mips
parenttarget/mips: Fix single stepping (diff)
downloadqemu-1a79c413999e241bbc24487b4db08faec2493c9d.tar.gz
qemu-1a79c413999e241bbc24487b4db08faec2493c9d.tar.xz
qemu-1a79c413999e241bbc24487b4db08faec2493c9d.zip
target/mips: Drop exit checks for singlestep_enabled
GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/mips')
-rw-r--r--target/mips/tcg/translate.c50
1 files changed, 18 insertions, 32 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index f239f9ffc0..0e59b97190 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -4823,12 +4823,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
tcg_gen_exit_tb(ctx->base.tb, n);
} else {
gen_save_pc(dest);
- if (ctx->base.singlestep_enabled) {
- save_cpu_state(ctx, 0);
- gen_helper_raise_exception_debug(cpu_env);
- } else {
- tcg_gen_lookup_and_goto_ptr();
- }
+ tcg_gen_lookup_and_goto_ptr();
}
}
@@ -11788,10 +11783,6 @@ static void gen_branch(DisasContext *ctx, int insn_bytes)
} else {
tcg_gen_mov_tl(cpu_PC, btarget);
}
- if (ctx->base.singlestep_enabled) {
- save_cpu_state(ctx, 0);
- gen_helper_raise_exception_debug(cpu_env);
- }
tcg_gen_lookup_and_goto_ptr();
break;
default:
@@ -16111,28 +16102,23 @@ static void mips_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
{
DisasContext *ctx = container_of(dcbase, DisasContext, base);
- if (ctx->base.singlestep_enabled && ctx->base.is_jmp != DISAS_NORETURN) {
- save_cpu_state(ctx, ctx->base.is_jmp != DISAS_EXIT);
- gen_helper_raise_exception_debug(cpu_env);
- } else {
- switch (ctx->base.is_jmp) {
- case DISAS_STOP:
- gen_save_pc(ctx->base.pc_next);
- tcg_gen_lookup_and_goto_ptr();
- break;
- case DISAS_NEXT:
- case DISAS_TOO_MANY:
- save_cpu_state(ctx, 0);
- gen_goto_tb(ctx, 0, ctx->base.pc_next);
- break;
- case DISAS_EXIT:
- tcg_gen_exit_tb(NULL, 0);
- break;
- case DISAS_NORETURN:
- break;
- default:
- g_assert_not_reached();
- }
+ switch (ctx->base.is_jmp) {
+ case DISAS_STOP:
+ gen_save_pc(ctx->base.pc_next);
+ tcg_gen_lookup_and_goto_ptr();
+ break;
+ case DISAS_NEXT:
+ case DISAS_TOO_MANY:
+ save_cpu_state(ctx, 0);
+ gen_goto_tb(ctx, 0, ctx->base.pc_next);
+ break;
+ case DISAS_EXIT:
+ tcg_gen_exit_tb(NULL, 0);
+ break;
+ case DISAS_NORETURN:
+ break;
+ default:
+ g_assert_not_reached();
}
}