On 06/14/2018 12:53 AM, Mark Cave-Ayland wrote:
> + if (dc->base.tb->cflags & CF_USE_ICOUNT) {
> + gen_io_start();
> + }
Need to use tb_cflags(dc->base.tb) for the atomic_read therein.
> + if (dc->base.tb->cflags & CF_USE_ICOUNT)
> {
> + gen_io_end();
> + /* End TB to handle timer interrupt
> */
> + save_state(dc);
> + gen_op_next_insn();
> + tcg_gen_exit_tb(NULL, 0);
> + dc->base.is_jmp = DISAS_NORETURN;
> + }
Exiting the TB should not be dependent on icount.
I would encourage you to introduce e.g. DISAS_EXIT, and code to handle that in
sparc_tr_tb_stop, to avoid replicating this pattern so many times.
r~