[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] target-mips: save cpu state before calling MSA load

From: Leon Alrae
Subject: [Qemu-devel] [PATCH] target-mips: save cpu state before calling MSA load and store helpers
Date: Mon, 16 Mar 2015 16:29:34 +0000

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.

Signed-off-by: Leon Alrae <address@hidden>
 target-mips/translate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index 9059bfd..7a8a00e 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -18403,12 +18403,14 @@ static void gen_msa(CPUMIPSState *env, DisasContext 
             case OPC_LD_H:
             case OPC_LD_W:
             case OPC_LD_D:
+                save_cpu_state(ctx, 1);
                 gen_helper_msa_ld_df(cpu_env, tdf, twd, trs, ts10);
             case OPC_ST_B:
             case OPC_ST_H:
             case OPC_ST_W:
             case OPC_ST_D:
+                save_cpu_state(ctx, 1);
                 gen_helper_msa_st_df(cpu_env, tdf, twd, trs, ts10);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]