From patchwork Thu Jun 19 14:45:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 361894 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 74A61140092 for ; Fri, 20 Jun 2014 00:52:58 +1000 (EST) Received: from localhost ([::1]:36024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxdhw-0004PL-Mg for incoming@patchwork.ozlabs.org; Thu, 19 Jun 2014 10:52:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxdcD-0003N2-U9 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:47:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxdc7-0004t9-Uv for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:47:01 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:16274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxdc7-0004t0-Pm for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:46:55 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 03ED5C8A2BAA; Thu, 19 Jun 2014 15:46:51 +0100 (IST) Received: from localhost.localdomain (192.168.14.85) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 19 Jun 2014 15:46:53 +0100 From: Leon Alrae To: Date: Thu, 19 Jun 2014 15:45:41 +0100 Message-ID: <1403189143-54609-11-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1403189143-54609-1-git-send-email-leon.alrae@imgtec.com> References: <1403189143-54609-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.14.85] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, leon.alrae@imgtec.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 10/12] target-mips: update cpu_save/cpu_load to support BadInstr registers 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 Signed-off-by: Leon Alrae --- target-mips/machine.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/target-mips/machine.c b/target-mips/machine.c index 966c5ef..a51b344 100644 --- a/target-mips/machine.c +++ b/target-mips/machine.c @@ -26,6 +26,10 @@ static void save_tc(QEMUFile *f, TCState *tc) qemu_put_betls(f, &tc->CP0_TCScheFBack); qemu_put_sbe32s(f, &tc->CP0_Debug_tcstatus); qemu_put_betls(f, &tc->CP0_UserLocal); + qemu_put_be32s(f, &tc->last_instr); + qemu_put_be32s(f, &tc->CP0_BadInstr); + qemu_put_be32s(f, &tc->last_branch); + qemu_put_be32s(f, &tc->CP0_BadInstrP); } static void save_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu) @@ -179,6 +183,10 @@ static void load_tc(QEMUFile *f, TCState *tc, int version_id) qemu_get_sbe32s(f, &tc->CP0_Debug_tcstatus); if (version_id >= 4) { qemu_get_betls(f, &tc->CP0_UserLocal); + qemu_get_be32s(f, &tc->last_instr); + qemu_get_be32s(f, &tc->CP0_BadInstr); + qemu_get_be32s(f, &tc->last_branch); + qemu_get_be32s(f, &tc->CP0_BadInstrP); } }