Skip to content

Commit 0bb1bbd

Browse files
committed
Initialize delay_slot_flag correctly
1 parent d755a8b commit 0bb1bbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

qemu/include/exec/gen-icount.h

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ static inline void gen_tb_start(TCGContext *tcg_ctx, TranslationBlock *tb)
4545
// We CANT'T use brcondi_i32 here or we will fail liveness analysis
4646
// because it marks the end of BB
4747
if (tcg_ctx->delay_slot_flag != NULL) {
48+
// Initialize delay_slot_flag here
49+
tcg_gen_movi_i32(tcg_ctx, tcg_ctx->delay_slot_flag, 0);
4850
TCGv_i32 tmp = tcg_const_i32(tcg_ctx, 0);
4951
// dest = (c1 cond c2 ? v1 : v2)
5052
tcg_gen_movcond_i32(tcg_ctx, TCG_COND_GT, count, tcg_ctx->delay_slot_flag, tmp, tcg_ctx->delay_slot_flag, count);

0 commit comments

Comments
 (0)