static int cpu_mips_register (CPUMIPSState *env, const mips_def_t *def)

{

    env->CP0_PRid = def->CP0_PRid;

    env->CP0_Config0 = def->CP0_Config0;

#ifdef TARGET_WORDS_BIGENDIAN

    env->CP0_Config0 |= (1 << CP0C0_BE);

#endif

    env->CP0_Config1 = def->CP0_Config1;

    env->CP0_Config2 = def->CP0_Config2;

    env->CP0_Config3 = def->CP0_Config3;

    env->CP0_Config6 = def->CP0_Config6;

    env->CP0_Config7 = def->CP0_Config7;

    env->SYNCI_Step = def->SYNCI_Step;

    env->CCRes = def->CCRes;

    env->CP0_Status_rw_bitmask = def->CP0_Status_rw_bitmask;

    env->CP0_TCStatus_rw_bitmask = def->CP0_TCStatus_rw_bitmask;

    env->CP0_SRSCtl = def->CP0_SRSCtl;

    env->current_tc = 0;

    env->SEGBITS = def->SEGBITS;

    env->SEGMask = (target_ulong)((1ULL << def->SEGBITS) - 1);

#if defined(TARGET_MIPS64)

    if (def->insn_flags & ISA_MIPS3) {

        env->hflags |= MIPS_HFLAG_64;

        env->SEGMask |= 3ULL << 62;

    }

#endif

    env->PABITS = def->PABITS;

    env->PAMask = (target_ulong)((1ULL << def->PABITS) - 1);

    env->CP0_SRSConf0_rw_bitmask = def->CP0_SRSConf0_rw_bitmask;

    env->CP0_SRSConf0 = def->CP0_SRSConf0;

    env->CP0_SRSConf1_rw_bitmask = def->CP0_SRSConf1_rw_bitmask;

    env->CP0_SRSConf1 = def->CP0_SRSConf1;

    env->CP0_SRSConf2_rw_bitmask = def->CP0_SRSConf2_rw_bitmask;

    env->CP0_SRSConf2 = def->CP0_SRSConf2;

    env->CP0_SRSConf3_rw_bitmask = def->CP0_SRSConf3_rw_bitmask;

    env->CP0_SRSConf3 = def->CP0_SRSConf3;

    env->CP0_SRSConf4_rw_bitmask = def->CP0_SRSConf4_rw_bitmask;

    env->CP0_SRSConf4 = def->CP0_SRSConf4;

    env->insn_flags = def->insn_flags;



#ifndef CONFIG_USER_ONLY

    if (!env->user_mode_only)

        mmu_init(env, def);

#endif

    fpu_init(env, def);

    mvp_init(env, def);

    return 0;

}

static int cpu_mips_register (CPUMIPSState *env, const mips_def_t *def)

{

    env->CP0_PRid = def->CP0_PRid;

    env->CP0_Config0 = def->CP0_Config0;

#ifdef TARGET_WORDS_BIGENDIAN

    env->CP0_Config0 |= (1 << CP0C0_BE);

#endif

    env->CP0_Config1 = def->CP0_Config1;

    env->CP0_Config2 = def->CP0_Config2;

    env->CP0_Config3 = def->CP0_Config3;

    env->CP0_Config6 = def->CP0_Config6;

    env->CP0_Config7 = def->CP0_Config7;

    env->SYNCI_Step = def->SYNCI_Step;

    env->CCRes = def->CCRes;

    env->CP0_Status_rw_bitmask = def->CP0_Status_rw_bitmask;

    env->CP0_TCStatus_rw_bitmask = def->CP0_TCStatus_rw_bitmask;

    env->CP0_SRSCtl = def->CP0_SRSCtl;

    env->current_tc = 0;

    env->SEGBITS = def->SEGBITS;

    env->SEGMask = (target_ulong)((1ULL << def->SEGBITS) - 1);

#if defined(TARGET_MIPS64)

    if (def->insn_flags & ISA_MIPS3) {

        env->hflags |= MIPS_HFLAG_64;

        env->SEGMask |= 3ULL << 62;

    }

#endif

    env->PABITS = def->PABITS;

    env->PAMask = (target_ulong)((1ULL << def->PABITS) - 1);

    env->CP0_SRSConf0_rw_bitmask = def->CP0_SRSConf0_rw_bitmask;

    env->CP0_SRSConf0 = def->CP0_SRSConf0;

    env->CP0_SRSConf1_rw_bitmask = def->CP0_SRSConf1_rw_bitmask;

    env->CP0_SRSConf1 = def->CP0_SRSConf1;

    env->CP0_SRSConf2_rw_bitmask = def->CP0_SRSConf2_rw_bitmask;

    env->CP0_SRSConf2 = def->CP0_SRSConf2;

    env->CP0_SRSConf3_rw_bitmask = def->CP0_SRSConf3_rw_bitmask;

    env->CP0_SRSConf3 = def->CP0_SRSConf3;

    env->CP0_SRSConf4_rw_bitmask = def->CP0_SRSConf4_rw_bitmask;

    env->CP0_SRSConf4 = def->CP0_SRSConf4;

    env->insn_flags = def->insn_flags;



#ifndef CONFIG_USER_ONLY

    if (!env->user_mode_only)

        mmu_init(env, def);

#endif

    fpu_init(env, def);

    mvp_init(env, def);

    return 0;

}

static int FUNC_0 (CPUMIPSState *VAR_0, const mips_def_t *VAR_1)

{

    VAR_0->CP0_PRid = VAR_1->CP0_PRid;

    VAR_0->CP0_Config0 = VAR_1->CP0_Config0;

#ifdef TARGET_WORDS_BIGENDIAN

    VAR_0->CP0_Config0 |= (1 << CP0C0_BE);

#endif

    VAR_0->CP0_Config1 = VAR_1->CP0_Config1;

    VAR_0->CP0_Config2 = VAR_1->CP0_Config2;

    VAR_0->CP0_Config3 = VAR_1->CP0_Config3;

    VAR_0->CP0_Config6 = VAR_1->CP0_Config6;

    VAR_0->CP0_Config7 = VAR_1->CP0_Config7;

    VAR_0->SYNCI_Step = VAR_1->SYNCI_Step;

    VAR_0->CCRes = VAR_1->CCRes;

    VAR_0->CP0_Status_rw_bitmask = VAR_1->CP0_Status_rw_bitmask;

    VAR_0->CP0_TCStatus_rw_bitmask = VAR_1->CP0_TCStatus_rw_bitmask;

    VAR_0->CP0_SRSCtl = VAR_1->CP0_SRSCtl;

    VAR_0->current_tc = 0;

    VAR_0->SEGBITS = VAR_1->SEGBITS;

    VAR_0->SEGMask = (target_ulong)((1ULL << VAR_1->SEGBITS) - 1);

#if defined(TARGET_MIPS64)

    if (VAR_1->insn_flags & ISA_MIPS3) {

        VAR_0->hflags |= MIPS_HFLAG_64;

        VAR_0->SEGMask |= 3ULL << 62;

    }

#endif

    VAR_0->PABITS = VAR_1->PABITS;

    VAR_0->PAMask = (target_ulong)((1ULL << VAR_1->PABITS) - 1);

    VAR_0->CP0_SRSConf0_rw_bitmask = VAR_1->CP0_SRSConf0_rw_bitmask;

    VAR_0->CP0_SRSConf0 = VAR_1->CP0_SRSConf0;

    VAR_0->CP0_SRSConf1_rw_bitmask = VAR_1->CP0_SRSConf1_rw_bitmask;

    VAR_0->CP0_SRSConf1 = VAR_1->CP0_SRSConf1;

    VAR_0->CP0_SRSConf2_rw_bitmask = VAR_1->CP0_SRSConf2_rw_bitmask;

    VAR_0->CP0_SRSConf2 = VAR_1->CP0_SRSConf2;

    VAR_0->CP0_SRSConf3_rw_bitmask = VAR_1->CP0_SRSConf3_rw_bitmask;

    VAR_0->CP0_SRSConf3 = VAR_1->CP0_SRSConf3;

    VAR_0->CP0_SRSConf4_rw_bitmask = VAR_1->CP0_SRSConf4_rw_bitmask;

    VAR_0->CP0_SRSConf4 = VAR_1->CP0_SRSConf4;

    VAR_0->insn_flags = VAR_1->insn_flags;



#ifndef CONFIG_USER_ONLY

    if (!VAR_0->user_mode_only)

        mmu_init(VAR_0, VAR_1);

#endif

    fpu_init(VAR_0, VAR_1);

    mvp_init(VAR_0, VAR_1);

    return 0;

}

static int FUNC_0 (CPUMIPSState *VAR_0, const mips_def_t *VAR_1)
{ VAR_0->CP0_PRid = VAR_1->CP0_PRid; VAR_0->CP0_Config0 = VAR_1->CP0_Config0; #ifdef TARGET_WORDS_BIGENDIAN
VAR_0->CP0_Config0 |= (1 << CP0C0_BE); #endif
VAR_0->CP0_Config1 = VAR_1->CP0_Config1; VAR_0->CP0_Config2 = VAR_1->CP0_Config2; VAR_0->CP0_Config3 = VAR_1->CP0_Config3; VAR_0->CP0_Config6 = VAR_1->CP0_Config6; VAR_0->CP0_Config7 = VAR_1->CP0_Config7; VAR_0->SYNCI_Step = VAR_1->SYNCI_Step; VAR_0->CCRes = VAR_1->CCRes; VAR_0->CP0_Status_rw_bitmask = VAR_1->CP0_Status_rw_bitmask; VAR_0->CP0_TCStatus_rw_bitmask = VAR_1->CP0_TCStatus_rw_bitmask; VAR_0->CP0_SRSCtl = VAR_1->CP0_SRSCtl; VAR_0->current_tc = 0; VAR_0->SEGBITS = VAR_1->SEGBITS; VAR_0->SEGMask = (target_ulong)((1ULL << VAR_1->SEGBITS) - 1); #if defined(TARGET_MIPS64)
if (VAR_1->insn_flags & ISA_MIPS3) { VAR_0->hflags |= MIPS_HFLAG_64; VAR_0->SEGMask |= 3ULL << 62; } #endif
VAR_0->PABITS = VAR_1->PABITS; VAR_0->PAMask = (target_ulong)((1ULL << VAR_1->PABITS) - 1); VAR_0->CP0_SRSConf0_rw_bitmask = VAR_1->CP0_SRSConf0_rw_bitmask; VAR_0->CP0_SRSConf0 = VAR_1->CP0_SRSConf0; VAR_0->CP0_SRSConf1_rw_bitmask = VAR_1->CP0_SRSConf1_rw_bitmask; VAR_0->CP0_SRSConf1 = VAR_1->CP0_SRSConf1; VAR_0->CP0_SRSConf2_rw_bitmask = VAR_1->CP0_SRSConf2_rw_bitmask; VAR_0->CP0_SRSConf2 = VAR_1->CP0_SRSConf2; VAR_0->CP0_SRSConf3_rw_bitmask = VAR_1->CP0_SRSConf3_rw_bitmask; VAR_0->CP0_SRSConf3 = VAR_1->CP0_SRSConf3; VAR_0->CP0_SRSConf4_rw_bitmask = VAR_1->CP0_SRSConf4_rw_bitmask; VAR_0->CP0_SRSConf4 = VAR_1->CP0_SRSConf4; VAR_0->insn_flags = VAR_1->insn_flags; #ifndef CONFIG_USER_ONLY
if (!VAR_0->user_mode_only)
mmu_init(VAR_0, VAR_1); #endif
fpu_init(VAR_0, VAR_1); mvp_init(VAR_0, VAR_1); return 0; }