target/mips: Clean up handling of CP0 register 26

Clean up handling of CP0 register 26.

Backports commit dbbf08b2892a7cf93e47f84c512953234a452cec from qemu
This commit is contained in:
Aleksandar Markovic 2019-11-18 23:37:00 -05:00 committed by Lioncash
parent 7f23faefa3
commit 9fe6520144
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 5 additions and 5 deletions

View file

@ -422,7 +422,7 @@ typedef struct mips_def_t mips_def_t;
#define CP0_REG25__PERFCTL3 6
#define CP0_REG25__PERFCNT3 7
/* CP0 Register 26 */
#define CP0_REG00__ERRCTL 0
#define CP0_REG26__ERRCTL 0
/* CP0 Register 27 */
#define CP0_REG27__CACHERR 0
/* CP0 Register 28 */

View file

@ -7535,7 +7535,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_26:
switch (sel) {
case 0:
case CP0_REG26__ERRCTL:
gen_mfc0_load32(ctx, arg, offsetof(CPUMIPSState, CP0_ErrCtl));
register_name = "ErrCtl";
break;
@ -8293,7 +8293,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_26:
switch (sel) {
case 0:
case CP0_REG26__ERRCTL:
gen_helper_mtc0_errctl(tcg_ctx, tcg_ctx->cpu_env, arg);
ctx->base.is_jmp = DISAS_STOP;
register_name = "ErrCtl";
@ -9020,7 +9020,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_26:
switch (sel) {
case 0:
case CP0_REG26__ERRCTL:
gen_mfc0_load32(ctx, arg, offsetof(CPUMIPSState, CP0_ErrCtl));
register_name = "ErrCtl";
break;
@ -9756,7 +9756,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_26:
switch (sel) {
case 0:
case CP0_REG26__ERRCTL:
gen_helper_mtc0_errctl(tcg_ctx, tcg_ctx->cpu_env, arg);
ctx->base.is_jmp = DISAS_STOP;
register_name = "ErrCtl";