diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-22 23:08:01 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-06-05 12:04:29 -0700 |
commit | dfd1b81274140c5f511d549f7b3ec7675a6597f4 (patch) | |
tree | 56799cc228b1d70b7529fa197566900dd8a2dfdc /target/openrisc | |
parent | 56234233594d05b1092b3cb04de845aeffa27f4c (diff) | |
download | qemu-dfd1b81274140c5f511d549f7b3ec7675a6597f4.zip qemu-dfd1b81274140c5f511d549f7b3ec7675a6597f4.tar.gz qemu-dfd1b81274140c5f511d549f7b3ec7675a6597f4.tar.bz2 |
accel/tcg: Introduce translator_io_start
New wrapper around gen_io_start which takes care of the USE_ICOUNT
check, as well as marking the DisasContext to end the TB.
Remove exec/gen-icount.h.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/openrisc')
-rw-r--r-- | target/openrisc/translate.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 06e6eae..7760329 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -31,7 +31,6 @@ #include "exec/helper-proto.h" #include "exec/helper-gen.h" -#include "exec/gen-icount.h" #include "exec/log.h" @@ -828,8 +827,7 @@ static bool trans_l_mfspr(DisasContext *dc, arg_l_mfspr *a) check_r0_write(dc, a->d); - if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { - gen_io_start(); + if (translator_io_start(&dc->base)) { if (dc->delayed_branch) { tcg_gen_mov_tl(cpu_pc, jmp_pc); tcg_gen_discard_tl(jmp_pc); @@ -848,9 +846,8 @@ static bool trans_l_mtspr(DisasContext *dc, arg_l_mtspr *a) { TCGv spr = tcg_temp_new(); - if (tb_cflags(dc->base.tb) & CF_USE_ICOUNT) { - gen_io_start(); - } + translator_io_start(&dc->base); + /* * For SR, we will need to exit the TB to recognize the new * exception state. For NPC, in theory this counts as a branch |