From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XheD6-0002LU-Nx for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XheD1-0007dy-Lj for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:16 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:62051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XheD1-0007dr-E3 for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:11 -0400 From: Leon Alrae Date: Fri, 24 Oct 2014 13:42:26 +0100 Message-ID: <1414154549-2102-13-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1414154549-2102-1-git-send-email-leon.alrae@imgtec.com> References: <1414154549-2102-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 12/15] target-mips: CP0_Status.CU0 no longer allows the user to access CP0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 6367d8c..3b975eb 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; } -- 2.1.0