diff mbox series

[PULL,6/9] target/sh4: Update DisasContextBase.insn_start

Message ID 20240507143309.5528-7-richard.henderson@linaro.org
State Accepted
Commit ca51921158e3cc07520a0ef5eb33739e5852ac6e
Headers show
Series [PULL,1/9] tcg: Add write_aofs to GVecGen3i | expand

Commit Message

Richard Henderson May 7, 2024, 2:33 p.m. UTC
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>
---
 target/sh4/translate.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index e599ab9d1a..b3282f3ac7 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -2189,6 +2189,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