target/mips: Clean up handling of CP0 register 30

Clean up handling of CP0 register 30.

Backports commit 4bcf121ebb009db8d135d8819b8d5837cfd6bb37 from qemu
This commit is contained in:
Aleksandar Markovic 2019-11-18 23:43:54 -05:00 committed by Lioncash
parent 6fae1432ce
commit d012faa9bf
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -7600,7 +7600,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_30:
switch (sel) {
case 0:
case CP0_REG30__ERROREPC:
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_ErrorEPC));
tcg_gen_ext32s_tl(tcg_ctx, arg, arg);
register_name = "ErrorEPC";
@ -8352,7 +8352,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_30:
switch (sel) {
case 0:
case CP0_REG30__ERROREPC:
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_ErrorEPC));
register_name = "ErrorEPC";
break;
@ -9075,7 +9075,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_30:
switch (sel) {
case 0:
case CP0_REG30__ERROREPC:
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_ErrorEPC));
register_name = "ErrorEPC";
break;
@ -9809,7 +9809,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
break;
case CP0_REGISTER_30:
switch (sel) {
case 0:
case CP0_REG30__ERROREPC:
tcg_gen_st_tl(tcg_ctx, arg, tcg_ctx->cpu_env, offsetof(CPUMIPSState, CP0_ErrorEPC));
register_name = "ErrorEPC";
break;