Revision aaed909a target-ppc/helper.c

b/target-ppc/helper.c
2970 2970
    tlb_flush(env, 1);
2971 2971
}
2972 2972

  
2973
CPUPPCState *cpu_ppc_init (void)
2973
CPUPPCState *cpu_ppc_init (const char *cpu_model)
2974 2974
{
2975 2975
    CPUPPCState *env;
2976
    const ppc_def_t *def;
2977

  
2978
    def = cpu_ppc_find_by_name(cpu_model);
2979
    if (!def)
2980
        return NULL;
2976 2981

  
2977 2982
    env = qemu_mallocz(sizeof(CPUPPCState));
2978 2983
    if (!env)
2979 2984
        return NULL;
2980 2985
    cpu_exec_init(env);
2981

  
2986
    cpu_ppc_register_internal(env, def);
2987
    cpu_ppc_reset(env);
2982 2988
    return env;
2983 2989
}
2984 2990

  
2985 2991
void cpu_ppc_close (CPUPPCState *env)
2986 2992
{
2987 2993
    /* Should also remove all opcode tables... */
2988
    free(env);
2994
    qemu_free(env);
2989 2995
}

Also available in: Unified diff