Commit bc2c390907757c4d172279e81395b8818338abec
1 parent
9827e95c
fixed priviledgees for CP0 use (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1476 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
target-mips/translate.c
... | ... | @@ -971,7 +971,10 @@ static void gen_cp0 (DisasContext *ctx, uint16_t opc, int rt, int rd) |
971 | 971 | { |
972 | 972 | const unsigned char *opn = "unk"; |
973 | 973 | |
974 | - if (!(ctx->CP0_Status & (1 << CP0St_CU0))) { | |
974 | + if (!(ctx->CP0_Status & (1 << CP0St_CU0)) && | |
975 | + !(ctx->hflags & MIPS_HFLAG_UM) && | |
976 | + !(ctx->hflags & MIPS_HFLAG_ERL) && | |
977 | + !(ctx->hflags & MIPS_HFLAG_EXL)) { | |
975 | 978 | if (loglevel & CPU_LOG_TB_IN_ASM) { |
976 | 979 | fprintf(logfile, "CP0 is not usable\n"); |
977 | 980 | } | ... | ... |