summaryrefslogtreecommitdiff
path: root/target-mips/translate_init.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 11:57:27 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 11:57:27 +0000
commitf01be154589f6e137195d9cc28d1296d885e4eea (patch)
treeb8effdfbfaddddcbbd81e876a62ff18da6686c0f /target-mips/translate_init.c
parenta1cf28f469883f89e83d6026986254806e88c235 (diff)
downloadqemu-f01be154589f6e137195d9cc28d1296d885e4eea.tar.gz
Move the active FPU registers into env again, and use more TCG registers
to access them. Signed-off-by: Thiemo Seufer <ths@networkno.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5252 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/translate_init.c')
-rw-r--r--target-mips/translate_init.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
index 8270c59901..0026cd06ff 100644
--- a/target-mips/translate_init.c
+++ b/target-mips/translate_init.c
@@ -489,14 +489,17 @@ static void mmu_init (CPUMIPSState *env, const mips_def_t *def)
static void fpu_init (CPUMIPSState *env, const mips_def_t *def)
{
- env->fpu = qemu_mallocz(sizeof(CPUMIPSFPUContext));
+ int i;
+
+ for (i = 0; i < MIPS_FPU_MAX; i++)
+ env->fpus[i].fcr0 = def->CP1_fcr0;
- env->fpu->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;
#ifdef TARGET_MIPS64
- if (env->fpu->fcr0 & (1 << FCR0_F64))
+ if (env->active_fpu.fcr0 & (1 << FCR0_F64))
env->hflags |= MIPS_HFLAG_F64;
#endif
}