aboutsummaryrefslogtreecommitdiff
path: root/target-mips/translate_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/translate_init.c')
-rw-r--r--target-mips/translate_init.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
index 7ec82b0d23..d0243aa1d9 100644
--- a/target-mips/translate_init.c
+++ b/target-mips/translate_init.c
@@ -495,14 +495,14 @@ static void fpu_init (CPUMIPSState *env, const mips_def_t *def)
env->fpus[i].fcr0 = def->CP1_fcr0;
memcpy(&env->active_fpu, &env->fpus[0], sizeof(env->active_fpu));
- if (env->user_mode_only) {
- if (env->CP0_Config1 & (1 << CP0C1_FP))
- env->hflags |= MIPS_HFLAG_FPU;
+#if defined(CONFIG_USER_ONLY)
+ if (env->CP0_Config1 & (1 << CP0C1_FP))
+ env->hflags |= MIPS_HFLAG_FPU;
#ifdef TARGET_MIPS64
- if (env->active_fpu.fcr0 & (1 << FCR0_F64))
- env->hflags |= MIPS_HFLAG_F64;
+ if (env->active_fpu.fcr0 & (1 << FCR0_F64))
+ env->hflags |= MIPS_HFLAG_F64;
+#endif
#endif
- }
}
static void mvp_init (CPUMIPSState *env, const mips_def_t *def)
@@ -520,9 +520,10 @@ static void mvp_init (CPUMIPSState *env, const mips_def_t *def)
// (0x04 << CP0MVPC0_PTC);
(1 << CP0MVPC0_TCA) | (0x0 << CP0MVPC0_PVPE) |
(0x04 << CP0MVPC0_PTC);
+#if !defined(CONFIG_USER_ONLY)
/* Usermode has no TLB support */
- if (!env->user_mode_only)
- env->mvp->CP0_MVPConf0 |= (env->tlb->nb_tlb << CP0MVPC0_PTLBE);
+ env->mvp->CP0_MVPConf0 |= (env->tlb->nb_tlb << CP0MVPC0_PTLBE);
+#endif
/* Allocatable CP1 have media extensions, allocatable CP1 have FP support,
no UDI implemented, no CP2 implemented, 1 CP1 implemented. */
@@ -572,8 +573,7 @@ static int cpu_mips_register (CPUMIPSState *env, const mips_def_t *def)
env->insn_flags = def->insn_flags;
#ifndef CONFIG_USER_ONLY
- if (!env->user_mode_only)
- mmu_init(env, def);
+ mmu_init(env, def);
#endif
fpu_init(env, def);
mvp_init(env, def);