From patchwork Fri Mar 16 18:12:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pedromfc X-Patchwork-Id: 26343 Received: (qmail 40841 invoked by alias); 16 Mar 2018 18:13:26 -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 40746 invoked by uid 89); 16 Mar 2018 18:13:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*MI:1632 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; Fri, 16 Mar 2018 18:13:24 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2GI4lTF069206 for ; Fri, 16 Mar 2018 14:13:22 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0b-001b2d01.pphosted.com with ESMTP id 2grf2g29v5-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 16 Mar 2018 14:13:22 -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, 16 Mar 2018 12:13:21 -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; Fri, 16 Mar 2018 12:13:20 -0600 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2GIDJKb13828430; Fri, 16 Mar 2018 11:13:19 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6EED7BE038; Fri, 16 Mar 2018 12:13:19 -0600 (MDT) Received: from pedro.localdomain (unknown [9.18.235.226]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id 37DDDBE03A; Fri, 16 Mar 2018 12:13:19 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id 018D93C4E8F; Fri, 16 Mar 2018 15:13:17 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com Subject: [PATCH] [PowerPC] Fix stwux and stdux masks in skip_prologue Date: Fri, 16 Mar 2018 15:12:51 -0300 X-TM-AS-GCONF: 00 x-cbid: 18031618-0020-0000-0000-00000D99C510 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008686; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01003980; UDB=6.00510991; IPR=6.00783269; MB=3.00020076; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-16 18:13:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031618-0021-0000-0000-0000608570F9 Message-Id: <20180316181251.1632-1-pedromfc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-16_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803160217 X-IsSubscribed: yes This patch merges the masks for matching the stwux and stdux instructions in rs6000-tdep.c:skip_prologue into a single mask that only matches these two instructions. Commit 72dd273062 fixed the warning described in PR gdb/18295, this patch addresses the comment in the same PR indicating that the mask was too permissive. gdb/Changelog: 2018-mm-dd Pedro Franco de Carvalho * rs6000-tdep.c (skip_prologue): Match both stwux and stdux with a single mask. --- gdb/rs6000-tdep.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index a5b70917b7..2b60196247 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1857,8 +1857,8 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, offset = fdata->offset; continue; } - else if ((op & 0xfc1f016e) == 0x7c01016e) - { /* stwux rX,r1,rY */ + else if ((op & 0xfc1f07fa) == 0x7c01016a) + { /* stwux rX,r1,rY || stdux rX,r1,rY */ /* No way to figure out what r1 is going to be. */ fdata->frameless = 0; offset = fdata->offset; @@ -1871,13 +1871,6 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc, offset = fdata->offset; continue; } - else if ((op & 0xfc1f016a) == 0x7c01016a) - { /* stdux rX,r1,rY */ - /* No way to figure out what r1 is going to be. */ - fdata->frameless = 0; - offset = fdata->offset; - continue; - } else if ((op & 0xffff0000) == 0x38210000) { /* addi r1,r1,SIMM */ fdata->frameless = 0;