From: bellard Date: Sat, 2 Jul 2005 15:27:11 +0000 (+0000) Subject: fixed priviledgees for CP0 use (Ralf Baechle) X-Git-Tag: release_0_7_1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc2c390907757c4d172279e81395b8818338abec;p=thirdparty%2Fqemu.git fixed priviledgees for CP0 use (Ralf Baechle) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1476 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/target-mips/translate.c b/target-mips/translate.c index 386bf74b3f2..d781fccfbdb 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -971,7 +971,10 @@ static void gen_cp0 (DisasContext *ctx, uint16_t opc, int rt, int rd) { const unsigned char *opn = "unk"; - if (!(ctx->CP0_Status & (1 << CP0St_CU0))) { + if (!(ctx->CP0_Status & (1 << CP0St_CU0)) && + !(ctx->hflags & MIPS_HFLAG_UM) && + !(ctx->hflags & MIPS_HFLAG_ERL) && + !(ctx->hflags & MIPS_HFLAG_EXL)) { if (loglevel & CPU_LOG_TB_IN_ASM) { fprintf(logfile, "CP0 is not usable\n"); }