Revision 0a032cbe target-ppc/translate_init.c

b/target-ppc/translate_init.c
2713 2713
    return 0;
2714 2714
}
2715 2715

  
2716
void do_compute_hflags (CPUPPCState *env);
2717
CPUPPCState *cpu_ppc_init (void)
2718
{
2719
    CPUPPCState *env;
2720

  
2721
    env = qemu_mallocz(sizeof(CPUPPCState));
2722
    if (!env)
2723
        return NULL;
2724
    cpu_exec_init(env);
2725
    tlb_flush(env, 1);
2726
#if defined (DO_SINGLE_STEP) && 0
2727
    /* Single step trace mode */
2728
    msr_se = 1;
2729
    msr_be = 1;
2730
#endif
2731
    msr_fp = 1; /* Allow floating point exceptions */
2732
    msr_me = 1; /* Allow machine check exceptions  */
2733
#if defined(CONFIG_USER_ONLY)
2734
    msr_pr = 1;
2735
#else
2736
    env->nip = 0xFFFFFFFC;
2737
#endif
2738
    do_compute_hflags(env);
2739
    env->reserve = -1;
2740
    return env;
2741
}
2742

  
2743
void cpu_ppc_close(CPUPPCState *env)
2744
{
2745
    /* Should also remove all opcode tables... */
2746
    free(env);
2747
}
2748

  
2749 2716
/*****************************************************************************/
2750 2717
/* PowerPC CPU definitions */
2751 2718
static ppc_def_t ppc_defs[] =

Also available in: Unified diff