e2k: Fix incorrect epilogue counter decrement.

This commit is contained in:
Denis Drakhnia 2021-01-25 22:43:48 +02:00 committed by Denis Drakhnia
parent 9e8c927036
commit 38ef61024d
1 changed files with 2 additions and 5 deletions

View File

@ -846,18 +846,15 @@ static void gen_advance_loop_counters(void)
TCGv_i32 t0 = tcg_temp_new_i32();
TCGv_i32 t1 = tcg_temp_new_i32();
TCGv_i32 t2 = tcg_temp_new_i32();
TCGv_i32 t3 = tcg_temp_new_i32();
gen_dec_sat_i32(e2k_cs.lsr_pcnt, e2k_cs.lsr_pcnt);
gen_dec_sat_i32(e2k_cs.lsr_lcnt, e2k_cs.lsr_lcnt);
tcg_gen_setcondi_i32(TCG_COND_EQ, t0, e2k_cs.lsr_pcnt, 0);
tcg_gen_setcondi_i32(TCG_COND_EQ, t1, e2k_cs.lsr_lcnt, 0);
tcg_gen_mov_i32(e2k_cs.lsr_over, t1);
tcg_gen_and_i32(t2, t0, t1);
gen_dec_sat_i32(t3, e2k_cs.lsr_ecnt);
tcg_gen_movcond_i32(TCG_COND_NE, e2k_cs.lsr_ecnt, t2, z, t3, e2k_cs.lsr_ecnt);
gen_dec_sat_i32(t2, e2k_cs.lsr_ecnt);
tcg_gen_movcond_i32(TCG_COND_NE, e2k_cs.lsr_ecnt, t1, z, t2, e2k_cs.lsr_ecnt);
tcg_temp_free_i32(t3);
tcg_temp_free_i32(t2);
tcg_temp_free_i32(t1);
tcg_temp_free_i32(t0);