Received: from eggs.gnu.org ([2001:4830:134:3::10]:44589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6izd-0001jT-KZ for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:20:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6izY-00082V-IX for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:20:45 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:27168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6izY-00082J-9l for qemu-devel@nongnu.org; Mon, 14 Jul 2014 12:20:40 -0400 From: Leon Alrae Date: Mon, 14 Jul 2014 17:19:52 +0100 Message-ID: <1405354795-25884-4-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1405354795-25884-1-git-send-email-leon.alrae@imgtec.com> References: <1405354795-25884-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 3/6] 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: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, leon.alrae@imgtec.com, aurelien@aurel32.net Signed-off-by: Leon Alrae --- 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 a35ab9d..b981ec7 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -789,7 +789,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; } -- 1.7.5.4