Skip to content

Commit

Permalink
target/microblaze: Convert to tcg_ops restore_state_to_opc
Browse files Browse the repository at this point in the history
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
rth7680 committed Oct 26, 2022
1 parent 584fd34 commit 52b8d9a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 11 additions & 0 deletions target/microblaze/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ static void mb_cpu_synchronize_from_tb(CPUState *cs,
cpu->env.iflags = tb->flags & IFLAGS_TB_MASK;
}

static void mb_restore_state_to_opc(CPUState *cs,
const TranslationBlock *tb,
const uint64_t *data)
{
MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);

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

static bool mb_cpu_has_work(CPUState *cs)
{
return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI);
Expand Down Expand Up @@ -373,6 +383,7 @@ static const struct SysemuCPUOps mb_sysemu_ops = {
static const struct TCGCPUOps mb_tcg_ops = {
.initialize = mb_tcg_init,
.synchronize_from_tb = mb_cpu_synchronize_from_tb,
.restore_state_to_opc = mb_restore_state_to_opc,

#ifndef CONFIG_USER_ONLY
.tlb_fill = mb_cpu_tlb_fill,
Expand Down
7 changes: 0 additions & 7 deletions target/microblaze/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1946,10 +1946,3 @@ void mb_tcg_init(void)
cpu_res_addr =
tcg_global_mem_new(cpu_env, offsetof(CPUMBState, res_addr), "res_addr");
}

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

0 comments on commit 52b8d9a

Please sign in to comment.