Revision f01be154 target-mips/translate_init.c

b/target-mips/translate_init.c
489 489

  
490 490
static void fpu_init (CPUMIPSState *env, const mips_def_t *def)
491 491
{
492
    env->fpu = qemu_mallocz(sizeof(CPUMIPSFPUContext));
492
    int i;
493

  
494
    for (i = 0; i < MIPS_FPU_MAX; i++)
495
        env->fpus[i].fcr0 = def->CP1_fcr0;
493 496

  
494
    env->fpu->fcr0 = def->CP1_fcr0;
497
    memcpy(&env->active_fpu, &env->fpus[0], sizeof(env->active_fpu));
495 498
    if (env->user_mode_only) {
496 499
        if (env->CP0_Config1 & (1 << CP0C1_FP))
497 500
            env->hflags |= MIPS_HFLAG_FPU;
498 501
#ifdef TARGET_MIPS64
499
        if (env->fpu->fcr0 & (1 << FCR0_F64))
502
        if (env->active_fpu.fcr0 & (1 << FCR0_F64))
500 503
            env->hflags |= MIPS_HFLAG_F64;
501 504
#endif
502 505
    }

Also available in: Unified diff