Skip to content

Commit a63eb0c

Browse files
author
Leon Alrae
committed
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>
1 parent 339cd2a commit a63eb0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

target-mips/cpu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ static inline void compute_hflags(CPUMIPSState *env)
790790
}
791791
}
792792
#endif
793-
if ((env->CP0_Status & (1 << CP0St_CU0)) ||
793+
if (((env->CP0_Status & (1 << CP0St_CU0)) &&
794+
!(env->insn_flags & ISA_MIPS32R6)) ||
794795
!(env->hflags & MIPS_HFLAG_KSU)) {
795796
env->hflags |= MIPS_HFLAG_CP0;
796797
}

0 commit comments

Comments
 (0)