From patchwork Wed Mar 18 14:37:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 451489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 76AB1140082 for ; Thu, 19 Mar 2015 01:38:52 +1100 (AEDT) Received: from localhost ([::1]:34168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYF7S-00075B-Kw for incoming@patchwork.ozlabs.org; Wed, 18 Mar 2015 10:38:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYF6r-0006Ck-O1 for qemu-devel@nongnu.org; Wed, 18 Mar 2015 10:38:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYF6q-0005C4-OC for qemu-devel@nongnu.org; Wed, 18 Mar 2015 10:38:13 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:7740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYF6q-0005Bw-Fx for qemu-devel@nongnu.org; Wed, 18 Mar 2015 10:38:12 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 5F4D8529B142 for ; Wed, 18 Mar 2015 14:38:08 +0000 (GMT) Received: from lalrae-linux.kl.imgtec.org (192.168.14.163) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 18 Mar 2015 14:38:11 +0000 From: Leon Alrae To: Date: Wed, 18 Mar 2015 14:37:33 +0000 Message-ID: <1426689453-9347-4-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1426689453-9347-1-git-send-email-leon.alrae@imgtec.com> References: <1426689453-9347-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.14.163] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Subject: [Qemu-devel] [PULL 3/3] target-mips: save cpu state before calling MSA load and store helpers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 a91e503..fd063a2 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -18414,12 +18414,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; }