mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-29 14:30:36 +00:00
target/mips: Clean up handling of CP0 register 14
Clean up handling of CP0 register 14. Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1567009614-12438-16-git-send-email-aleksandar.markovic@rt-rk.com>
This commit is contained in:
parent
e3c7559d89
commit
35e4b54d90
@ -361,6 +361,7 @@ typedef struct mips_def_t mips_def_t;
|
||||
#define CP0_REG13__NESTEDEXC 5
|
||||
/* CP0 Register 14 */
|
||||
#define CP0_REG14__EPC 0
|
||||
#define CP0_REG14__NESTEDEPC 2
|
||||
/* CP0 Register 15 */
|
||||
#define CP0_REG15__PRID 0
|
||||
#define CP0_REG15__EBASE 1
|
||||
|
@ -7212,7 +7212,7 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||
break;
|
||||
case CP0_REGISTER_14:
|
||||
switch (sel) {
|
||||
case 0:
|
||||
case CP0_REG14__EPC:
|
||||
tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||
tcg_gen_ext32s_tl(arg, arg);
|
||||
register_name = "EPC";
|
||||
@ -7946,7 +7946,7 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||
break;
|
||||
case CP0_REGISTER_14:
|
||||
switch (sel) {
|
||||
case 0:
|
||||
case CP0_REG14__EPC:
|
||||
tcg_gen_st_tl(arg, cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||
register_name = "EPC";
|
||||
break;
|
||||
@ -8687,7 +8687,7 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||
break;
|
||||
case CP0_REGISTER_14:
|
||||
switch (sel) {
|
||||
case 0:
|
||||
case CP0_REG14__EPC:
|
||||
tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||
register_name = "EPC";
|
||||
break;
|
||||
@ -9409,7 +9409,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
|
||||
break;
|
||||
case CP0_REGISTER_14:
|
||||
switch (sel) {
|
||||
case 0:
|
||||
case CP0_REG14__EPC:
|
||||
tcg_gen_st_tl(arg, cpu_env, offsetof(CPUMIPSState, CP0_EPC));
|
||||
register_name = "EPC";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user