From patchwork Fri Jul 13 13:52:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Franco de Carvalho X-Patchwork-Id: 28375 Received: (qmail 100263 invoked by alias); 13 Jul 2018 13:53:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 100086 invoked by uid 89); 13 Jul 2018 13:53:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1881 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Jul 2018 13:53:38 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6DDnBct112721 for ; Fri, 13 Jul 2018 09:53:36 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k6tywpav1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 13 Jul 2018 09:53:36 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jul 2018 07:53:35 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 13 Jul 2018 07:53:33 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6DDrU4J11665804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Jul 2018 06:53:30 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D89C78060; Fri, 13 Jul 2018 07:53:30 -0600 (MDT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2BE627805E; Fri, 13 Jul 2018 07:53:30 -0600 (MDT) Received: from pedro.localdomain (unknown [9.85.180.127]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 13 Jul 2018 07:53:30 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id E7B173C04AD; Fri, 13 Jul 2018 10:53:24 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com, edjunior@gmail.com Subject: [PATCH 06/17] [PowerPC] Add record/replay support for PPR and DSCR Date: Fri, 13 Jul 2018 10:52:15 -0300 In-Reply-To: <20180713135226.2321-1-pedromfc@linux.ibm.com> References: <20180713135226.2321-1-pedromfc@linux.ibm.com> x-cbid: 18071313-0020-0000-0000-00000E3D7778 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009363; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01060763; UDB=6.00544525; IPR=6.00838681; MB=3.00022128; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-13 13:53:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071313-0021-0000-0000-00006244BD1A Message-Id: <20180713135226.2321-7-pedromfc@linux.ibm.com> This patch changes ppc_process_record_op31 to handle instructions that change PPR and DSCR. gdb/ChangeLog: YYYY-MM-DD Pedro Franco de Carvalho * rs6000-tdep.c (ppc_process_record_op31): Record changes to PPR and DSCR. --- gdb/rs6000-tdep.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 294d6ea702..f390370455 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -4428,6 +4428,16 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 476: /* NAND */ case 412: /* OR with Complement */ case 444: /* OR */ + /* Or Rx,Rx,Rx alters PRI in PPR. */ + if (tdep->ppc_ppr_regnum >= 0 + && (PPC_RS (insn) == PPC_RA (insn)) + && (PPC_RA (insn) == PPC_RB (insn)) + && !PPC_RC (insn)) + { + record_full_arch_list_add_reg (regcache, tdep->ppc_ppr_regnum); + return 0; + } + /* FALL-THROUGH */ case 536: /* Shift Right Word */ case 539: /* Shift Right Doubleword */ case 922: /* Extend Sign Halfword */ @@ -4646,6 +4656,10 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 1: /* XER */ record_full_arch_list_add_reg (regcache, tdep->ppc_xer_regnum); return 0; + case 3: /* DSCR */ + if (tdep->ppc_dscr_regnum >= 0) + record_full_arch_list_add_reg (regcache, tdep->ppc_dscr_regnum); + return 0; case 8: /* LR */ record_full_arch_list_add_reg (regcache, tdep->ppc_lr_regnum); return 0; @@ -4655,6 +4669,11 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 256: /* VRSAVE */ record_full_arch_list_add_reg (regcache, tdep->ppc_vrsave_regnum); return 0; + case 896: + case 898: /* PPR */ + if (tdep->ppc_ppr_regnum >= 0) + record_full_arch_list_add_reg (regcache, tdep->ppc_ppr_regnum); + return 0; } goto UNKNOWN_OP;