mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
5623423359
commit
dfd1b81274
33 changed files with 117 additions and 269 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue