diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2009-12-11 09:29:20 -0800 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-13 21:01:33 +0100 |
commit | 91a759352623e4a3da969fa66626cc99241e9da2 (patch) | |
tree | 91c34993793945574cf7e86c122a3c0b044a1f8a /target-mips/translate_init.c | |
parent | f1e00a9cf326acc1f2386a72525af8859852e1df (diff) |
target-mips: fix user-mode emulation startup
Running programs with the MIPS user-mode emulator fails during dynamic
loading, as floating-point instructions are not enabled in in
env->hflags. Move the code for doing so from fpu_init to cpu_reset so
the MIPS_HFLAG_{FPU,F64} setting doesn't get clobbered by cpu_reset
setting env->hflags to MIPS_HFLAG_UM.
The same end can be achieved by swapping the ordering of fpu_init and
cpu_reset in cpu_mips_init, but it seemed better to consolidate the
CONFIG_USER_ONLY code into a single location.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-mips/translate_init.c')
-rw-r--r-- | target-mips/translate_init.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index 6f50555e2d..11bc47c0a3 100644 --- a/target-mips/translate_init.c +++ b/target-mips/translate_init.c @@ -533,14 +533,6 @@ 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 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; -#endif -#endif } static void mvp_init (CPUMIPSState *env, const mips_def_t *def) |