Skip to content

Commit

Permalink
target-ppc: Use cpu_exec_enter qom hook
Browse files Browse the repository at this point in the history
Cc: [email protected]
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
rth7680 authored and pm215 committed Sep 25, 2014
1 parent 00f3fd6 commit 774f0ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,6 @@ int cpu_exec(CPUArchState *env)
cpu->exit_request = 1;
}

#if defined(TARGET_PPC)
env->reserve_addr = -1;
#endif
cc->cpu_exec_enter(cpu);
cpu->exception_index = -1;

Expand Down
9 changes: 9 additions & 0 deletions target-ppc/translate_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -9456,6 +9456,14 @@ static bool ppc_cpu_has_work(CPUState *cs)
return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);
}

static void ppc_cpu_exec_enter(CPUState *cs)
{
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *env = &cpu->env;

env->reserve_addr = -1;
}

/* CPUClass::reset() */
static void ppc_cpu_reset(CPUState *s)
{
Expand Down Expand Up @@ -9638,6 +9646,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
cc->write_elf64_qemunote = ppc64_cpu_write_elf64_qemunote;
#endif
#endif
cc->cpu_exec_enter = ppc_cpu_exec_enter;

cc->gdb_num_core_regs = 71;

Expand Down

0 comments on commit 774f0ab

Please sign in to comment.