[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFCv2 PATCH 1/1] SPARC64: add icount support
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [RFCv2 PATCH 1/1] SPARC64: add icount support |
Date: |
Thu, 14 Jun 2018 11:02:26 -1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
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~