From patchwork Mon May 21 20:44:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pedromfc X-Patchwork-Id: 27381 Received: (qmail 48313 invoked by alias); 21 May 2018 23:45:59 -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 48260 invoked by uid 89); 21 May 2018 23:45:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 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; Mon, 21 May 2018 23:45:50 +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 w4LKiGfY125854 for ; Mon, 21 May 2018 16:45:53 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j421j065a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 21 May 2018 16:45:53 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 May 2018 14:45:53 -0600 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 21 May 2018 14:45:51 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4LKjoKd10092984; Mon, 21 May 2018 13:45:50 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 47F8E7803F; Mon, 21 May 2018 14:45:50 -0600 (MDT) Received: from pedro.localdomain (unknown [9.18.235.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id 1147978043; Mon, 21 May 2018 14:45:50 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id 7D40C3C03F9; Mon, 21 May 2018 17:45:45 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com Subject: [PATCH v2 7/8] [PowerPC] Fix inclusion of dfp pseudoregs in tdep Date: Mon, 21 May 2018 17:44:57 -0300 In-Reply-To: <20180521204458.19070-1-pedromfc@linux.vnet.ibm.com> References: <20180510195840.17734-1-pedromfc@linux.vnet.ibm.com> <20180521204458.19070-1-pedromfc@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18052120-8235-0000-0000-00000D8AACA7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009062; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000261; SDB=6.01035688; UDB=6.00529761; IPR=6.00814816; MB=3.00021228; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-21 20:45:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052120-8236-0000-0000-0000411196AC Message-Id: <20180521204458.19070-7-pedromfc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-21_08:, , 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-1805210246 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 0a56c7890a..ff4699c191 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -5981,14 +5981,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)