summaryrefslogtreecommitdiffstats
path: root/target/microblaze
diff options
context:
space:
mode:
authorRichard Henderson2020-08-18 05:12:21 +0200
committerRichard Henderson2020-09-01 16:41:38 +0200
commit0b46fa08213b5e575b14a6dc883b45af8c37f6f6 (patch)
tree718625f6e312e5bf4cc5f099367aa725fa7925b9 /target/microblaze
parenttarget/microblaze: Use DISAS_NORETURN (diff)
downloadqemu-0b46fa08213b5e575b14a6dc883b45af8c37f6f6.tar.gz
qemu-0b46fa08213b5e575b14a6dc883b45af8c37f6f6.tar.xz
qemu-0b46fa08213b5e575b14a6dc883b45af8c37f6f6.zip
target/microblaze: Check singlestep_enabled in gen_goto_tb
Do not use goto_tb if we're single-stepping. Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/microblaze')
-rw-r--r--target/microblaze/translate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 53ca0bfb38..2e753fa621 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -140,7 +140,12 @@ static inline bool use_goto_tb(DisasContext *dc, target_ulong dest)
static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
{
- if (use_goto_tb(dc, dest)) {
+ if (dc->singlestep_enabled) {
+ TCGv_i32 tmp = tcg_const_i32(EXCP_DEBUG);
+ tcg_gen_movi_i32(cpu_pc, dest);
+ gen_helper_raise_exception(cpu_env, tmp);
+ tcg_temp_free_i32(tmp);
+ } else if (use_goto_tb(dc, dest)) {
tcg_gen_goto_tb(n);
tcg_gen_movi_i32(cpu_pc, dest);
tcg_gen_exit_tb(dc->tb, n);