diff options
author | Pavel Dovgalyuk | 2019-07-25 10:44:55 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-08-20 17:26:22 +0200 |
commit | 9e9b10c6491153b60ccfd021328f1f88e1669550 (patch) | |
tree | fc7d5e3cf568f14e22930b6d055a5a7ef3523c49 /include | |
parent | icount: clean up cpu_can_io at the entry to the block (diff) | |
download | qemu-9e9b10c6491153b60ccfd021328f1f88e1669550.tar.gz qemu-9e9b10c6491153b60ccfd021328f1f88e1669550.tar.xz qemu-9e9b10c6491153b60ccfd021328f1f88e1669550.zip |
icount: remove unnecessary gen_io_end calls
Prior patch resets can_do_io flag at the TB entry. Therefore there is no
need in resetting this flag at the end of the block.
This patch removes redundant gen_io_end calls.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <156404429499.18669.13404064982854123855.stgit@pasha-Precision-3630-Tower>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/gen-icount.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 4004e6c9d0..822c43cfd3 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -16,6 +16,13 @@ static inline void gen_io_start(void) tcg_temp_free_i32(tmp); } +/* + * cpu->can_do_io is cleared automatically at the beginning of + * each translation block. The cost is minimal and only paid + * for -icount, plus it would be very easy to forget doing it + * in the translator. Therefore, backends only need to call + * gen_io_start. + */ static inline void gen_io_end(void) { TCGv_i32 tmp = tcg_const_i32(0); @@ -58,7 +65,6 @@ static inline void gen_tb_start(TranslationBlock *tb) tcg_gen_st16_i32(count, cpu_env, offsetof(ArchCPU, neg.icount_decr.u16.low) - offsetof(ArchCPU, env)); - /* Disable I/O by default */ gen_io_end(); } |