target/xtensa: always end TB on CCOUNT access/CCOMPARE write

Currently we only end TB in icount mode, because access to CCOUNT or
write to CCOMPARE are IO operations. Simplify the behaviour a bit and
end TB unconditionally.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov 2018-09-01 21:56:21 -07:00
parent 9dccbd1c69
commit 06ec08a0be

View file

@ -505,9 +505,8 @@ static bool gen_rsr_ccount(DisasContext *dc, TCGv_i32 d, uint32_t sr)
tcg_gen_mov_i32(d, cpu_SR[sr]); tcg_gen_mov_i32(d, cpu_SR[sr]);
if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) {
gen_io_end(); gen_io_end();
return true;
} }
return false; return true;
} }
static bool gen_rsr_ptevaddr(DisasContext *dc, TCGv_i32 d, uint32_t sr) static bool gen_rsr_ptevaddr(DisasContext *dc, TCGv_i32 d, uint32_t sr)
@ -735,11 +734,10 @@ static bool gen_wsr_ccount(DisasContext *dc, uint32_t sr, TCGv_i32 v)
gen_helper_wsr_ccount(cpu_env, v); gen_helper_wsr_ccount(cpu_env, v);
if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) {
gen_io_end(); gen_io_end();
}
gen_jumpi_check_loop_end(dc, 0); gen_jumpi_check_loop_end(dc, 0);
return true; return true;
} }
return false;
}
static bool gen_wsr_icount(DisasContext *dc, uint32_t sr, TCGv_i32 v) static bool gen_wsr_icount(DisasContext *dc, uint32_t sr, TCGv_i32 v)
{ {
@ -773,11 +771,10 @@ static bool gen_wsr_ccompare(DisasContext *dc, uint32_t sr, TCGv_i32 v)
tcg_temp_free(tmp); tcg_temp_free(tmp);
if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) {
gen_io_end(); gen_io_end();
}
gen_jumpi_check_loop_end(dc, 0); gen_jumpi_check_loop_end(dc, 0);
return true; return true;
} }
return false;
}
#else #else
static void gen_check_interrupts(DisasContext *dc) static void gen_check_interrupts(DisasContext *dc)
{ {