From patchwork Thu May 10 19:58:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pedromfc X-Patchwork-Id: 27216 Received: (qmail 39365 invoked by alias); 10 May 2018 21:46:20 -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 39270 invoked by uid 89); 10 May 2018 21:46:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, 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= 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; Thu, 10 May 2018 21:46:18 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4AJxBfW057243 for ; Thu, 10 May 2018 15:59:15 -0400 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hvvft0j3y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 May 2018 15:59:15 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 May 2018 13:59:14 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 10 May 2018 13:59:12 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4AJxCtD12517778 for ; Thu, 10 May 2018 12:59:12 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4DE7BC604A for ; Thu, 10 May 2018 13:59:12 -0600 (MDT) Received: from pedro.localdomain (unknown [9.18.235.221]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id 224D4C603E for ; Thu, 10 May 2018 13:59:12 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id 839303C03E6; Thu, 10 May 2018 16:59:07 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Subject: [PATCH 7/8] [PowerPC] Fix inclusion of dfp pseudoregs in tdep Date: Thu, 10 May 2018 16:58:39 -0300 In-Reply-To: <20180510195840.17734-1-pedromfc@linux.vnet.ibm.com> References: <20180510195840.17734-1-pedromfc@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18051019-0024-0000-0000-000018624F86 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009001; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000259; SDB=6.01030392; UDB=6.00526595; IPR=6.00809523; MB=3.00021034; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-10 19:59:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051019-0025-0000-0000-00004FEA0769 Message-Id: <20180510195840.17734-8-pedromfc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-10_06:, , 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-1805100185 X-IsSubscribed: yes Previously, decimal floating point pseudoregisters were always included in the target if it had a floating point unit. This patch changes this to only include them if the target description indicates that they are present, i.e. if the FPSCR register has more than 32 bits. gdb/ChangeLog: yyyy-mm-dd Pedro Franco de Carvalho * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only if the size of fpscr is larger than 32 bits. --- gdb/rs6000-tdep.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 3f0b7f77a1..7e4662b337 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -6090,14 +6090,16 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return NULL; } have_fpu = 1; + + /* The fpscr register was expanded in isa 2.05 to 64 bits + along with the addition of the decimal floating point + facility. */ + if (tdesc_register_size(feature, "fpscr") > 32) + have_dfp = 1; } else have_fpu = 0; - /* The DFP pseudo-registers will be available when there are floating - point registers. */ - have_dfp = have_fpu; - feature = tdesc_find_feature (tdesc, "org.gnu.gdb.power.altivec"); if (feature != NULL)