mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-06-13 14:35:33 +00:00
target/mips: Clean up handling of CP0 register 14
Clean up handling of CP0 register 14. Backports commit 35e4b54d90b07736d24d736c50f236231cde929f from qemu
This commit is contained in:
parent
dc1e7c4467
commit
41133450de
|
@ -360,6 +360,7 @@ typedef struct mips_def_t mips_def_t;
|
||||||
#define CP0_REG13__NESTEDEXC 5
|
#define CP0_REG13__NESTEDEXC 5
|
||||||
/* CP0 Register 14 */
|
/* CP0 Register 14 */
|
||||||
#define CP0_REG14__EPC 0
|
#define CP0_REG14__EPC 0
|
||||||
|
#define CP0_REG14__NESTEDEPC 2
|
||||||
/* CP0 Register 15 */
|
/* CP0 Register 15 */
|
||||||
#define CP0_REG15__PRID 0
|
#define CP0_REG15__PRID 0
|
||||||
#define CP0_REG15__EBASE 1
|
#define CP0_REG15__EBASE 1
|
||||||
|
|
|
@ -7291,7 +7291,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||||
break;
|
break;
|
||||||
case CP0_REGISTER_14:
|
case CP0_REGISTER_14:
|
||||||
switch (sel) {
|
switch (sel) {
|
||||||
case 0:
|
case CP0_REG14__EPC:
|
||||||
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||||
tcg_gen_ext32s_tl(tcg_ctx, arg, arg);
|
tcg_gen_ext32s_tl(tcg_ctx, arg, arg);
|
||||||
register_name = "EPC";
|
register_name = "EPC";
|
||||||
|
@ -8026,7 +8026,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||||
break;
|
break;
|
||||||
case CP0_REGISTER_14:
|
case CP0_REGISTER_14:
|
||||||
switch (sel) {
|
switch (sel) {
|
||||||
case 0:
|
case CP0_REG14__EPC:
|
||||||
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||||
register_name = "EPC";
|
register_name = "EPC";
|
||||||
break;
|
break;
|
||||||
|
@ -8763,7 +8763,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||||
break;
|
break;
|
||||||
case CP0_REGISTER_14:
|
case CP0_REGISTER_14:
|
||||||
switch (sel) {
|
switch (sel) {
|
||||||
case 0:
|
case CP0_REG14__EPC:
|
||||||
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||||
register_name = "EPC";
|
register_name = "EPC";
|
||||||
break;
|
break;
|
||||||
|
@ -9482,7 +9482,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||||
break;
|
break;
|
||||||
case CP0_REGISTER_14:
|
case CP0_REGISTER_14:
|
||||||
switch (sel) {
|
switch (sel) {
|
||||||
case 0:
|
case CP0_REG14__EPC:
|
||||||
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||||
register_name = "EPC";
|
register_name = "EPC";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue