mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target-xtensa: QOM'ify CPU
Embed CPUXtensaState as first member of XtensaCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
7d6b9f0a38
commit
a4633e16d7
5 changed files with 154 additions and 1 deletions
|
@ -95,6 +95,7 @@ CPUXtensaState *cpu_xtensa_init(const char *cpu_model)
|
|||
{
|
||||
static int tcg_inited;
|
||||
static int debug_handler_inited;
|
||||
XtensaCPU *cpu;
|
||||
CPUXtensaState *env;
|
||||
const XtensaConfig *config = NULL;
|
||||
XtensaConfigList *core = xtensa_cores;
|
||||
|
@ -109,7 +110,8 @@ CPUXtensaState *cpu_xtensa_init(const char *cpu_model)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
env = g_malloc0(sizeof(*env));
|
||||
cpu = XTENSA_CPU(object_new(TYPE_XTENSA_CPU));
|
||||
env = &cpu->env;
|
||||
env->config = config;
|
||||
cpu_exec_init(env);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue