Skip to content

Commit

Permalink
target/cris: Convert to tcg_ops restore_state_to_opc
Browse files Browse the repository at this point in the history
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Oct 26, 2022
1 parent f06c1ad commit 4060474
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 11 additions & 0 deletions target/cris/cpu.c
Expand Up @@ -42,6 +42,15 @@ static vaddr cris_cpu_get_pc(CPUState *cs)
return cpu->env.pc;
}

static void cris_restore_state_to_opc(CPUState *cs,
const TranslationBlock *tb,
const uint64_t *data)
{
CRISCPU *cpu = CRIS_CPU(cs);

cpu->env.pc = data[0];
}

static bool cris_cpu_has_work(CPUState *cs)
{
return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
Expand Down Expand Up @@ -212,6 +221,7 @@ static const struct SysemuCPUOps cris_sysemu_ops = {

static const struct TCGCPUOps crisv10_tcg_ops = {
.initialize = cris_initialize_crisv10_tcg,
.restore_state_to_opc = cris_restore_state_to_opc,

#ifndef CONFIG_USER_ONLY
.tlb_fill = cris_cpu_tlb_fill,
Expand All @@ -222,6 +232,7 @@ static const struct TCGCPUOps crisv10_tcg_ops = {

static const struct TCGCPUOps crisv32_tcg_ops = {
.initialize = cris_initialize_tcg,
.restore_state_to_opc = cris_restore_state_to_opc,

#ifndef CONFIG_USER_ONLY
.tlb_fill = cris_cpu_tlb_fill,
Expand Down
6 changes: 0 additions & 6 deletions target/cris/translate.c
Expand Up @@ -3392,9 +3392,3 @@ void cris_initialize_tcg(void)
pregnames_v32[i]);
}
}

void restore_state_to_opc(CPUCRISState *env, TranslationBlock *tb,
target_ulong *data)
{
env->pc = data[0];
}

0 comments on commit 4060474

Please sign in to comment.