diff options
| author | Leon Alrae | 2014-07-11 17:11:34 +0200 |
|---|---|---|
| committer | Leon Alrae | 2014-11-03 12:48:34 +0100 |
| commit | a63eb0ce0f5c43cf022022c5f4860aaf4f292a06 (patch) | |
| tree | b9df307997920bbd39cb738cf4a87aa8ebed8d37 | |
| parent | target-mips: implement forbidden slot (diff) | |
| download | qemu-a63eb0ce0f5c43cf022022c5f4860aaf4f292a06.tar.gz qemu-a63eb0ce0f5c43cf022022c5f4860aaf4f292a06.tar.xz qemu-a63eb0ce0f5c43cf022022c5f4860aaf4f292a06.zip | |
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>
| -rw-r--r-- | target-mips/cpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 6367d8c52d..3b975ebe78 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -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; } |
