mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target-mips: QOM'ify CPU
Embed CPUMIPSState as first member of QOM MIPSCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
11150915fc
commit
0f71a7095d
5 changed files with 142 additions and 1 deletions
|
@ -12691,13 +12691,15 @@ static void mips_tcg_init(void)
|
|||
|
||||
CPUMIPSState *cpu_mips_init (const char *cpu_model)
|
||||
{
|
||||
MIPSCPU *cpu;
|
||||
CPUMIPSState *env;
|
||||
const mips_def_t *def;
|
||||
|
||||
def = cpu_mips_find_by_name(cpu_model);
|
||||
if (!def)
|
||||
return NULL;
|
||||
env = g_malloc0(sizeof(CPUMIPSState));
|
||||
cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));
|
||||
env = &cpu->env;
|
||||
env->cpu_model = def;
|
||||
env->cpu_model_str = cpu_model;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue