target/mips: Clean up handling of CP0 register 24

Clean up handling of CP0 register 24.

Backports commit 8d7b4b6efbab8b5286aa9f5948d3e2ce9f98aea5 from qemu
This commit is contained in:
Aleksandar Markovic 2019-11-18 23:31:36 -05:00 committed by Lioncash
parent 4626d0d314
commit d7b34101a0
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -7485,7 +7485,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_24:
switch (sel) {
case 0:
case CP0_REG24__DEPC:
/* EJTAG support */
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_DEPC));
tcg_gen_ext32s_tl(tcg_ctx, arg, arg);
@ -8244,7 +8244,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_24:
switch (sel) {
case 0:
case CP0_REG24__DEPC:
/* EJTAG support */
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_DEPC));
register_name = "DEPC";
@ -8971,7 +8971,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_24:
switch (sel) {
case 0:
case CP0_REG24__DEPC:
/* EJTAG support */
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_DEPC));
register_name = "DEPC";
@ -9707,7 +9707,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_24:
switch (sel) {
case 0:
case CP0_REG24__DEPC:
/* EJTAG support */
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_DEPC));
register_name = "DEPC";