[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/24] target/sh4: Drop check for singlestep_enabled
From: |
Richard Henderson |
Subject: |
[PULL 21/24] target/sh4: Drop check for singlestep_enabled |
Date: |
Sat, 16 Oct 2021 11:15:11 -0700 |
GDB single-stepping is now handled generically.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sh4/helper.h | 1 -
target/sh4/op_helper.c | 5 -----
target/sh4/translate.c | 14 +++-----------
3 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/target/sh4/helper.h b/target/sh4/helper.h
index 1e768fcbc7..8d792f6b55 100644
--- a/target/sh4/helper.h
+++ b/target/sh4/helper.h
@@ -3,7 +3,6 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env)
DEF_HELPER_1(raise_slot_illegal_instruction, noreturn, env)
DEF_HELPER_1(raise_fpu_disable, noreturn, env)
DEF_HELPER_1(raise_slot_fpu_disable, noreturn, env)
-DEF_HELPER_1(debug, noreturn, env)
DEF_HELPER_1(sleep, noreturn, env)
DEF_HELPER_2(trapa, noreturn, env, i32)
DEF_HELPER_1(exclusive, noreturn, env)
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index c0cbb95382..c996dce7df 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -81,11 +81,6 @@ void helper_raise_slot_fpu_disable(CPUSH4State *env)
raise_exception(env, 0x820, 0);
}
-void helper_debug(CPUSH4State *env)
-{
- raise_exception(env, EXCP_DEBUG, 0);
-}
-
void helper_sleep(CPUSH4State *env)
{
CPUState *cs = env_cpu(env);
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index d363050272..ce5d674a52 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -240,9 +240,7 @@ static void gen_goto_tb(DisasContext *ctx, int n,
target_ulong dest)
tcg_gen_exit_tb(ctx->base.tb, n);
} else {
tcg_gen_movi_i32(cpu_pc, dest);
- if (ctx->base.singlestep_enabled) {
- gen_helper_debug(cpu_env);
- } else if (use_exit_tb(ctx)) {
+ if (use_exit_tb(ctx)) {
tcg_gen_exit_tb(NULL, 0);
} else {
tcg_gen_lookup_and_goto_ptr();
@@ -258,9 +256,7 @@ static void gen_jump(DisasContext * ctx)
delayed jump as immediate jump are conditinal jumps */
tcg_gen_mov_i32(cpu_pc, cpu_delayed_pc);
tcg_gen_discard_i32(cpu_delayed_pc);
- if (ctx->base.singlestep_enabled) {
- gen_helper_debug(cpu_env);
- } else if (use_exit_tb(ctx)) {
+ if (use_exit_tb(ctx)) {
tcg_gen_exit_tb(NULL, 0);
} else {
tcg_gen_lookup_and_goto_ptr();
@@ -2324,11 +2320,7 @@ static void sh4_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cs)
switch (ctx->base.is_jmp) {
case DISAS_STOP:
gen_save_cpu_state(ctx, true);
- if (ctx->base.singlestep_enabled) {
- gen_helper_debug(cpu_env);
- } else {
- tcg_gen_exit_tb(NULL, 0);
- }
+ tcg_gen_exit_tb(NULL, 0);
break;
case DISAS_NEXT:
case DISAS_TOO_MANY:
--
2.25.1
- [PULL 15/24] target/openrisc: Drop checks for singlestep_enabled, (continued)
- [PULL 15/24] target/openrisc: Drop checks for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 20/24] target/s390x: Drop check for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 24/24] Revert "cpu: Move cpu_common_props to hw/core/cpu.c", Richard Henderson, 2021/10/16
- [PULL 08/24] target/i386: Check CF_NO_GOTO_TB for dc->jmp_opt, Richard Henderson, 2021/10/16
- [PULL 22/24] target/tricore: Drop check for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 03/24] target/avr: Drop checks for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 13/24] target/mips: Fix single stepping, Richard Henderson, 2021/10/16
- [PULL 16/24] target/ppc: Drop exit checks for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 19/24] target/rx: Drop checks for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 23/24] target/xtensa: Drop check for singlestep_enabled, Richard Henderson, 2021/10/16
- [PULL 21/24] target/sh4: Drop check for singlestep_enabled,
Richard Henderson <=
- Re: [PULL 00/24] tcg patch queue, Richard Henderson, 2021/10/16