Skip to content

Commit 52df5ad

Browse files
committed
target/sh4: Drop check for singlestep_enabled
GDB single-stepping is now handled generically. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
1 parent 2df7a36 commit 52df5ad

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

target/sh4/helper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ DEF_HELPER_1(raise_illegal_instruction, noreturn, env)
33
DEF_HELPER_1(raise_slot_illegal_instruction, noreturn, env)
44
DEF_HELPER_1(raise_fpu_disable, noreturn, env)
55
DEF_HELPER_1(raise_slot_fpu_disable, noreturn, env)
6-
DEF_HELPER_1(debug, noreturn, env)
76
DEF_HELPER_1(sleep, noreturn, env)
87
DEF_HELPER_2(trapa, noreturn, env, i32)
98
DEF_HELPER_1(exclusive, noreturn, env)

target/sh4/op_helper.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ void helper_raise_slot_fpu_disable(CPUSH4State *env)
8181
raise_exception(env, 0x820, 0);
8282
}
8383

84-
void helper_debug(CPUSH4State *env)
85-
{
86-
raise_exception(env, EXCP_DEBUG, 0);
87-
}
88-
8984
void helper_sleep(CPUSH4State *env)
9085
{
9186
CPUState *cs = env_cpu(env);

target/sh4/translate.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,7 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
240240
tcg_gen_exit_tb(ctx->base.tb, n);
241241
} else {
242242
tcg_gen_movi_i32(cpu_pc, dest);
243-
if (ctx->base.singlestep_enabled) {
244-
gen_helper_debug(cpu_env);
245-
} else if (use_exit_tb(ctx)) {
243+
if (use_exit_tb(ctx)) {
246244
tcg_gen_exit_tb(NULL, 0);
247245
} else {
248246
tcg_gen_lookup_and_goto_ptr();
@@ -258,9 +256,7 @@ static void gen_jump(DisasContext * ctx)
258256
delayed jump as immediate jump are conditinal jumps */
259257
tcg_gen_mov_i32(cpu_pc, cpu_delayed_pc);
260258
tcg_gen_discard_i32(cpu_delayed_pc);
261-
if (ctx->base.singlestep_enabled) {
262-
gen_helper_debug(cpu_env);
263-
} else if (use_exit_tb(ctx)) {
259+
if (use_exit_tb(ctx)) {
264260
tcg_gen_exit_tb(NULL, 0);
265261
} else {
266262
tcg_gen_lookup_and_goto_ptr();
@@ -2324,11 +2320,7 @@ static void sh4_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
23242320
switch (ctx->base.is_jmp) {
23252321
case DISAS_STOP:
23262322
gen_save_cpu_state(ctx, true);
2327-
if (ctx->base.singlestep_enabled) {
2328-
gen_helper_debug(cpu_env);
2329-
} else {
2330-
tcg_gen_exit_tb(NULL, 0);
2331-
}
2323+
tcg_gen_exit_tb(NULL, 0);
23322324
break;
23332325
case DISAS_NEXT:
23342326
case DISAS_TOO_MANY:

0 commit comments

Comments
 (0)