From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf4Ih-00029y-Fj for qemu-devel@nongnu.org; Fri, 17 Oct 2014 05:58:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xf4Ic-0004Ib-Cb for qemu-devel@nongnu.org; Fri, 17 Oct 2014 05:58:23 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:56916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf4Ic-0004IX-73 for qemu-devel@nongnu.org; Fri, 17 Oct 2014 05:58:18 -0400 Message-ID: <5440E833.1010900@imgtec.com> Date: Fri, 17 Oct 2014 10:58:11 +0100 From: Yongbok Kim MIME-Version: 1.0 References: <1405354795-25884-1-git-send-email-leon.alrae@imgtec.com> <1405354795-25884-4-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1405354795-25884-4-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Leon Alrae , qemu-devel@nongnu.org Cc: aurelien@aurel32.net Reviewed-by: Yongbok Kim Regards, Yongbok On 14/07/2014 17:19, Leon Alrae wrote: > 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; > }