From patchwork Tue Sep 20 08:04:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edjunior Barbosa Machado X-Patchwork-Id: 15788 Received: (qmail 28604 invoked by alias); 20 Sep 2016 08:04:24 -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 28588 invoked by uid 89); 20 Sep 2016 08:04:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL, BAYES_40, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Immediate, H*Ad:U*uweigand, aims, tdep X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Sep 2016 08:04:21 +0000 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8K83A6E001402 for ; Tue, 20 Sep 2016 04:04:19 -0400 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0b-001b2d01.pphosted.com with ESMTP id 25jkn47bek-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 20 Sep 2016 04:04:19 -0400 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Sep 2016 05:04:17 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 20 Sep 2016 05:04:16 -0300 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id EF7BA352005C for ; Tue, 20 Sep 2016 04:03:51 -0400 (EDT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by d24relay01.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8K84FOj5087302 for ; Tue, 20 Sep 2016 05:04:15 -0300 Received: from d24av01.br.ibm.com (localhost [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8K84FoZ006432 for ; Tue, 20 Sep 2016 05:04:15 -0300 Received: from dawn.ibm.com ([9.78.140.72]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u8K84Epf006427; Tue, 20 Sep 2016 05:04:14 -0300 From: Edjunior Barbosa Machado To: gdb-patches@sourceware.org Cc: Edjunior Barbosa Machado , Ulrich Weigand Subject: [PATCH] ppc: Fix record support of Store String Word instructions Date: Tue, 20 Sep 2016 05:04:05 -0300 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092008-0024-0000-0000-0000010AEB8F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092008-0025-0000-0000-000015B9A49D Message-Id: <1474358645-8337-1-git-send-email-emachado@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-09-20_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609200103 X-IsSubscribed: yes Hi, this patch aims to fix the record support of the ppc instructions Store String Word Immediate and Store String Word Indexed. Ok? Thanks, --- Edjunior 2016-09-20 Edjunior Barbosa Machado * rs6000-tdep.c (ppc_process_record_op31): Fix record of Store String Word instructions. --- gdb/rs6000-tdep.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 5f15780..263dda0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -4540,7 +4540,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 725: /* Store String Word Immediate */ ra = 0; if (PPC_RA (insn) != 0) - regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra); + regcache_raw_read_unsigned (regcache, + tdep->ppc_gp0_regnum + PPC_RA (insn), &ra); ea += ra; nb = PPC_NB (insn); @@ -4554,7 +4555,8 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, case 661: /* Store String Word Indexed */ ra = 0; if (PPC_RA (insn) != 0) - regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &ra); + regcache_raw_read_unsigned (regcache, + tdep->ppc_gp0_regnum + PPC_RA (insn), &ra); ea += ra; regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &xer); @@ -4562,7 +4564,9 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache, if (nb != 0) { - regcache_raw_read_unsigned (regcache, tdep->ppc_xer_regnum, &rb); + regcache_raw_read_unsigned (regcache, + tdep->ppc_gp0_regnum + PPC_RB (insn), + &rb); ea += rb; record_full_arch_list_add_mem (ea, nb); }