aboutsummaryrefslogtreecommitdiff
path: root/target-microblaze/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-microblaze/translate.c')
-rw-r--r--target-microblaze/translate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index b602820bb4..f4d32c8fbb 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -1891,11 +1891,13 @@ void cpu_dump_state (CPUMBState *env, FILE *f, fprintf_function cpu_fprintf,
CPUMBState *cpu_mb_init (const char *cpu_model)
{
+ MicroBlazeCPU *cpu;
CPUMBState *env;
static int tcg_initialized = 0;
int i;
- env = g_malloc0(sizeof(CPUMBState));
+ cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ env = &cpu->env;
cpu_exec_init(env);
cpu_state_reset(env);