From: Richard Henderson <richard.hender...@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.hender...@linaro.org>
(cherry picked from commit ca51921158e3cc07520a0ef5eb33739e5852ac6e)
Signed-off-by: Michael Tokarev <m...@tls.msk.ru>

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
-- 
2.39.2


Reply via email to