aboutsummaryrefslogtreecommitdiff
path: root/target-mips/translate.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-05-01 09:27:53 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-05-01 09:27:53 +0000
commit61d25e1548b5e5ec8b670e72e82a2a7b909f9d52 (patch)
tree6cfa2f23703fe891504e71ac4349de227e7ff746 /target-mips/translate.c
parent42fe1c245f0239ebcdc084740a1777ac3699d071 (diff)
parent894a84e632e4e71eaa3588d7ca9854bf4d9027ea (diff)
Merge branch 'qom-cpu-rest.v1' of git://github.com/afaerber/qemu-cpu
* 'qom-cpu-rest.v1' of git://github.com/afaerber/qemu-cpu: Makefile: Simplify compilation of target-*/cpu.c target-mips: Start QOM'ifying CPU init target-mips: QOM'ify CPU target-m68k: Add QOM CPU subclasses target-m68k: Start QOM'ifying CPU init target-m68k: QOM'ify CPU reset target-m68k: QOM'ify CPU target-sh4: Start QOM'ifying CPU init target-sh4: QOM'ify CPU reset target-sh4: QOM'ify CPU MAINTAINERS: Downgrade target-mips and target-sh4 to Odd Fixes MAINTAINERS: Downgrade target-m68k to Odd Fixes
Diffstat (limited to 'target-mips/translate.c')
-rw-r--r--target-mips/translate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index a663b743c1..f5297b0392 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -12691,17 +12691,18 @@ 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;
- cpu_exec_init(env);
#ifndef CONFIG_USER_ONLY
mmu_init(env, def);
#endif