diff mbox series

[Stable-9.0.1,24/44] target/sh4: Update DisasContextBase.insn_start

Message ID 20240527082138.66217-24-mjt@tls.msk.ru
State New
Headers show
Series None | expand

Commit Message

Michael Tokarev May 27, 2024, 8:21 a.m. UTC
From: Richard Henderson <richard.henderson@linaro.org>

Match the extra inserts of INDEX_op_insn_start, fixing
the db->num_insns != 1 assert in translator_loop.

Fixes: dcd092a0636 ("accel/tcg: Improve can_do_io management")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit ca51921158e3cc07520a0ef5eb33739e5852ac6e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff mbox series

Patch

diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 3e013b7c7c..f91d61b960 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -2181,6 +2181,7 @@  static void decode_gusa(DisasContext *ctx, CPUSH4State *env)
      */
     for (i = 1; i < max_insns; ++i) {
         tcg_gen_insn_start(pc + i * 2, ctx->envflags);
+        ctx->base.insn_start = tcg_last_op();
     }
 }
 #endif