Received: from eggs.gnu.org ([2001:4830:134:3::10]:45830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXXu2-0001iG-S5 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXXtx-0000S1-Sv for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:30:06 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:7377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXXtx-0000Q1-IG for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:30:01 -0400 From: Leon Alrae Date: Mon, 16 Mar 2015 16:29:34 +0000 Message-ID: <1426523374-18673-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] target-mips: save cpu state before calling MSA load and store helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net 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 --- 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 *ctx) 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); break; 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); break; } -- 2.1.0