* [PATCH] target/xtensa: drop gen_io_end call
@ 2020-06-22 5:35 Max Filippov
2020-06-22 10:23 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2020-06-22 5:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov
Since commit
ba3e7926691e ("icount: clean up cpu_can_io at the entry to the block")
it has been unnecessary for target code to call gen_io_end() after an IO
instruction in icount mode; it is sufficient to call gen_io_start()
before it and to force the end of the TB.
Remaining call in xtensa target translator is for the opcodes that may
change IRQ state. All of them end current TB, so gen_io_end is not
needed. Drop gen_io_end call from the xtensa target translator.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
target/xtensa/translate.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 4bc15252c8a5..6346b2eef014 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -595,9 +595,6 @@ static int gen_postprocess(DisasContext *dc, int slot)
gen_io_start();
}
gen_helper_check_interrupts(cpu_env);
- if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) {
- gen_io_end();
- }
}
#endif
if (op_flags & XTENSA_OP_SYNC_REGISTER_WINDOW) {
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/xtensa: drop gen_io_end call
2020-06-22 5:35 [PATCH] target/xtensa: drop gen_io_end call Max Filippov
@ 2020-06-22 10:23 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2020-06-22 10:23 UTC (permalink / raw)
To: Max Filippov; +Cc: QEMU Developers
On Mon, 22 Jun 2020 at 06:36, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Since commit
> ba3e7926691e ("icount: clean up cpu_can_io at the entry to the block")
> it has been unnecessary for target code to call gen_io_end() after an IO
> instruction in icount mode; it is sufficient to call gen_io_start()
> before it and to force the end of the TB.
> Remaining call in xtensa target translator is for the opcodes that may
> change IRQ state. All of them end current TB, so gen_io_end is not
> needed. Drop gen_io_end call from the xtensa target translator.
Most of the insns which set XTENSA_OP_CHECK_INTERRUPTS in their
.op_flags also set XTENSA_OP_EXIT_TB_M1 or XTENSA_OP_EXIT_TB_0;
the ones which don't are "rfe", "rfi", "rfwo" and "rfwu". Looking
through what they do, they all end up calling gen_jump(), which
will end the TB.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-22 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-22 5:35 [PATCH] target/xtensa: drop gen_io_end call Max Filippov
2020-06-22 10:23 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).