target-mips: CP0_Status.CU0 no longer allows the user to access CP0

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>
This commit is contained in:
Leon Alrae 2014-07-11 16:11:34 +01:00
parent 339cd2a82a
commit a63eb0ce0f
1 changed files with 2 additions and 1 deletions

View File

@ -790,7 +790,8 @@ static inline void compute_hflags(CPUMIPSState *env)
}
}
#endif
if ((env->CP0_Status & (1 << CP0St_CU0)) ||
if (((env->CP0_Status & (1 << CP0St_CU0)) &&
!(env->insn_flags & ISA_MIPS32R6)) ||
!(env->hflags & MIPS_HFLAG_KSU)) {
env->hflags |= MIPS_HFLAG_CP0;
}