diff --git a/qemu/target/mips/cpu.h b/qemu/target/mips/cpu.h index 77ed9895..9ae2d6bf 100644 --- a/qemu/target/mips/cpu.h +++ b/qemu/target/mips/cpu.h @@ -356,6 +356,8 @@ typedef struct mips_def_t mips_def_t; #define CP0_REG12__GTOFFSET 7 /* CP0 Register 13 */ #define CP0_REG13__CAUSE 0 +#define CP0_REG13__VIEW_RIPL 4 +#define CP0_REG13__NESTEDEXC 5 /* CP0 Register 14 */ #define CP0_REG14__EPC 0 /* CP0 Register 15 */ diff --git a/qemu/target/mips/translate.c b/qemu/target/mips/translate.c index 13571659..5f138a36 100644 --- a/qemu/target/mips/translate.c +++ b/qemu/target/mips/translate.c @@ -7281,7 +7281,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) break; case CP0_REGISTER_13: switch (sel) { - case 0: + case CP0_REG13__CAUSE: gen_mfc0_load32(ctx, arg, offsetof(CPUMIPSState, CP0_Cause)); register_name = "Cause"; break; @@ -8008,7 +8008,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) break; case CP0_REGISTER_13: switch (sel) { - case 0: + case CP0_REG13__CAUSE: save_cpu_state(ctx, 1); gen_helper_mtc0_cause(tcg_ctx, tcg_ctx->cpu_env, arg); /* @@ -8753,7 +8753,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) break; case CP0_REGISTER_13: switch (sel) { - case 0: + case CP0_REG13__CAUSE: gen_mfc0_load32(ctx, arg, offsetof(CPUMIPSState, CP0_Cause)); register_name = "Cause"; break; @@ -9464,7 +9464,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) break; case CP0_REGISTER_13: switch (sel) { - case 0: + case CP0_REG13__CAUSE: save_cpu_state(ctx, 1); gen_helper_mtc0_cause(tcg_ctx, tcg_ctx->cpu_env, arg); /*