diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-12 21:33:13 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-12 21:33:13 +0000 |
commit | 932e71cd57bab4e6206e1355c6425290721bbe34 (patch) | |
tree | ff7567c8318ff81adfb798b1ff8f7e3d63120e83 /target-mips/translate_init.c | |
parent | ae1c1a3d68c75ebc5487f123c73dcfff5844b02a (diff) |
target-mips: get rid of tests on env->user_mode_only
Replace runtime checks on env->user_mode_only by compile time
checks on CONFIG_USER_ONLY.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6276 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/translate_init.c')
-rw-r--r-- | target-mips/translate_init.c | 20 |
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); |