mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 22:55:32 +00:00
target-mips: save cpu state before calling MSA load and store helpers
PC needs to be saved if an exception can be generated by an helper. This fixes a problem related to resuming the execution at unexpected address after an exception (caused by MSA load/store instruction) has been serviced. Backports commit 0af7a37054310384e00209e0a43efe95b7c19ef0 from qemu
This commit is contained in:
parent
6cd0c5d775
commit
2d07e60f61
|
@ -18567,12 +18567,14 @@ static void gen_msa(CPUMIPSState *env, DisasContext *ctx)
|
||||||
case OPC_LD_H:
|
case OPC_LD_H:
|
||||||
case OPC_LD_W:
|
case OPC_LD_W:
|
||||||
case OPC_LD_D:
|
case OPC_LD_D:
|
||||||
|
save_cpu_state(ctx, 1);
|
||||||
gen_helper_msa_ld_df(tcg_ctx, tcg_ctx->cpu_env, tdf, twd, trs, ts10);
|
gen_helper_msa_ld_df(tcg_ctx, tcg_ctx->cpu_env, tdf, twd, trs, ts10);
|
||||||
break;
|
break;
|
||||||
case OPC_ST_B:
|
case OPC_ST_B:
|
||||||
case OPC_ST_H:
|
case OPC_ST_H:
|
||||||
case OPC_ST_W:
|
case OPC_ST_W:
|
||||||
case OPC_ST_D:
|
case OPC_ST_D:
|
||||||
|
save_cpu_state(ctx, 1);
|
||||||
gen_helper_msa_st_df(tcg_ctx, tcg_ctx->cpu_env, tdf, twd, trs, ts10);
|
gen_helper_msa_st_df(tcg_ctx, tcg_ctx->cpu_env, tdf, twd, trs, ts10);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue