aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r--target-alpha/translate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 1f4565d794..f773e6cffc 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -3525,10 +3525,12 @@ static const struct cpu_def_t cpu_defs[] = {
CPUAlphaState * cpu_alpha_init (const char *cpu_model)
{
+ AlphaCPU *cpu;
CPUAlphaState *env;
int implver, amask, i, max;
- env = g_malloc0(sizeof(CPUAlphaState));
+ cpu = ALPHA_CPU(object_new(TYPE_ALPHA_CPU));
+ env = &cpu->env;
cpu_exec_init(env);
alpha_translate_init();
tlb_flush(env, 1);