[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] target/tricore: Raise EXCP_DEBUG in gen_goto_tb() for single
From: |
Bastian Koppelmann |
Subject: |
[PATCH 3/5] target/tricore: Raise EXCP_DEBUG in gen_goto_tb() for singlestep |
Date: |
Mon, 30 Sep 2019 14:46:41 +0200 |
this is needed for remote gdb connections.
Signed-off-by: Bastian Koppelmann <address@hidden>
---
target/tricore/translate.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index 832ff6328d..6c6303795d 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -3238,6 +3238,14 @@ static inline bool use_goto_tb(DisasContext *ctx,
target_ulong dest)
#endif
}
+static void generate_qemu_excp(DisasContext *ctx, int excp)
+{
+ TCGv_i32 tmp = tcg_const_i32(excp);
+ gen_helper_qemu_excp(cpu_env, tmp);
+ ctx->base.is_jmp = DISAS_NORETURN;
+ tcg_temp_free(tmp);
+}
+
static inline void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
{
if (use_goto_tb(ctx, dest)) {
@@ -3247,7 +3255,7 @@ static inline void gen_goto_tb(DisasContext *ctx, int n,
target_ulong dest)
} else {
gen_save_pc(dest);
if (ctx->base.singlestep_enabled) {
- /* raise exception debug */
+ generate_qemu_excp(ctx, EXCP_DEBUG);
}
tcg_gen_exit_tb(NULL, 0);
}
@@ -3266,14 +3274,6 @@ static void generate_trap(DisasContext *ctx, int class,
int tin)
tcg_temp_free(tintemp);
}
-static void generate_qemu_excp(DisasContext *ctx, int excp)
-{
- TCGv_i32 tmp = tcg_const_i32(excp);
- gen_helper_qemu_excp(cpu_env, tmp);
- ctx->base.is_jmp = DISAS_NORETURN;
- tcg_temp_free(tmp);
-}
-
static inline void gen_branch_cond(DisasContext *ctx, TCGCond cond, TCGv r1,
TCGv r2, int16_t address)
{
--
2.23.0
- [PATCH 0/5] TriCore fixes and gdbstub, Bastian Koppelmann, 2019/09/30
- [PATCH 1/5] target/tricore: Don't save pc in generate_qemu_excp, Bastian Koppelmann, 2019/09/30
- [PATCH 5/5] target/tricore: Implement gdbstub, Bastian Koppelmann, 2019/09/30
- [PATCH 3/5] target/tricore: Raise EXCP_DEBUG in gen_goto_tb() for singlestep,
Bastian Koppelmann <=
- [PATCH 2/5] target/tricore: Move translate feature check to ctx, Bastian Koppelmann, 2019/09/30
- [PATCH 4/5] target/tricore: Implement tricore_cpu_get_phys_page_debug, Bastian Koppelmann, 2019/09/30
- Re: [PATCH 0/5] TriCore fixes and gdbstub, no-reply, 2019/09/30