target-mips: CP0_Status.CU0 no longer allows the user to access CP0
authorLeon Alrae <leon.alrae@imgtec.com>
Fri, 11 Jul 2014 15:11:34 +0000 (16:11 +0100)
committerLeon Alrae <leon.alrae@imgtec.com>
Mon, 3 Nov 2014 11:48:34 +0000 (11:48 +0000)
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>
target-mips/cpu.h

index 6367d8c52df05afdb073e59739bf7cc84fc4dc67..3b975ebe78a6630668e82d68342505ba3c7f434e 100644 (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;
     }