target/xtensa: drop gen_io_end call
PATCH 1/1 target/xtensa: drop gen_io_end call
Since commitba3e7926691e ("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.
--- target/xtensa/translate.c | 3 --- 1 file changed, 3 deletions(-)
target/xtensa/translate.c +0 -3
@@ -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 ) {
Signature · 1 line
2.20.1
Quoted 9 lines · Max Filippov
Since commit
ba3e7926691e("icount: clean upcpu_can_ioat the entry to the block") it has been unnecessary for target code to callgen_io_end()after an IO instruction in icount mode; it is sufficient to callgen_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, sogen_io_endis not needed. Dropgen_io_endcall 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.
thanks
-- PMM