aboutsummaryrefslogtreecommitdiff
path: root/target/alpha
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-05-22 23:08:01 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-06-05 12:04:29 -0700
commitdfd1b81274140c5f511d549f7b3ec7675a6597f4 (patch)
tree56799cc228b1d70b7529fa197566900dd8a2dfdc /target/alpha
parent56234233594d05b1092b3cb04de845aeffa27f4c (diff)
downloadqemu-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/alpha')
-rw-r--r--target/alpha/translate.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index 545e574..1f7dd07 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -96,8 +96,6 @@ static TCGv cpu_lock_value;
static TCGv cpu_pal_ir[31];
#endif
-#include "exec/gen-icount.h"
-
void alpha_translate_init(void)
{
#define DEF_VAR(V) { &cpu_##V, #V, offsetof(CPUAlphaState, V) }
@@ -1236,8 +1234,7 @@ static DisasJumpType gen_mfpr(DisasContext *ctx, TCGv va, int regno)
case 249: /* VMTIME */
helper = gen_helper_get_vmtime;
do_helper:
- if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
- gen_io_start();
+ if (translator_io_start(&ctx->base)) {
helper(va);
return DISAS_PC_STALE;
} else {
@@ -1298,8 +1295,7 @@ static DisasJumpType gen_mtpr(DisasContext *ctx, TCGv vb, int regno)
case 251:
/* ALARM */
- if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
- gen_io_start();
+ if (translator_io_start(&ctx->base)) {
ret = DISAS_PC_STALE;
}
gen_helper_set_alarm(cpu_env, vb);
@@ -2335,13 +2331,10 @@ static DisasJumpType translate_one(DisasContext *ctx, uint32_t insn)
case 0xC000:
/* RPCC */
va = dest_gpr(ctx, ra);
- if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
- gen_io_start();
- gen_helper_load_pcc(va, cpu_env);
+ if (translator_io_start(&ctx->base)) {
ret = DISAS_PC_STALE;
- } else {
- gen_helper_load_pcc(va, cpu_env);
}
+ gen_helper_load_pcc(va, cpu_env);
break;
case 0xE000:
/* RC */