Message ID | 20181022223242.7858-12-pedromfc@linux.ibm.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 43016 invoked by alias); 22 Oct 2018 22:56:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43001 invoked by uid 89); 22 Oct 2018 22:56:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= 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; Mon, 22 Oct 2018 22:56:35 +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 w9MMTfl9023621 for <gdb-patches@sourceware.org>; Mon, 22 Oct 2018 18:33:43 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 2n9k67hq68-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <gdb-patches@sourceware.org>; Mon, 22 Oct 2018 18:33:43 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <gdb-patches@sourceware.org> from <pedromfc@linux.ibm.com>; Mon, 22 Oct 2018 16:33:42 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 22 Oct 2018 16:33:39 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9MMXa5347775890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Oct 2018 15:33:36 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AEBCFC605B; Mon, 22 Oct 2018 22:33:36 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E2ABC6055; Mon, 22 Oct 2018 22:33:36 +0000 (GMT) Received: from pedro.localdomain (unknown [9.85.173.33]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 22 Oct 2018 22:33:36 +0000 (GMT) Received: by pedro.localdomain (Postfix, from userid 1000) id B113B3C0560; Mon, 22 Oct 2018 19:33:30 -0300 (-03) From: Pedro Franco de Carvalho <pedromfc@linux.ibm.com> To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com, edjunior@gmail.com Subject: [PATCH v5 11/12] [PowerPC] Reject tdescs with VSX and no FPU or Altivec Date: Mon, 22 Oct 2018 19:32:41 -0300 In-Reply-To: <20181022223242.7858-1-pedromfc@linux.ibm.com> References: <20181022223242.7858-1-pedromfc@linux.ibm.com> x-cbid: 18102222-0004-0000-0000-000014A2E317 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009918; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01106526; UDB=6.00573028; IPR=6.00886611; MB=3.00023862; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-22 22:33:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18102222-0005-0000-0000-0000893FF028 Message-Id: <20181022223242.7858-12-pedromfc@linux.ibm.com> |
Commit Message
Pedro Franco de Carvalho
Oct. 22, 2018, 10:32 p.m. UTC
Currently rs6000_gdbarch_init will accept a tdesc with the "org.gnu.gdb.power.vsx" feature but without the "org.gnu.gdb.power.altivec" or "org.gnu.gdb.power.fpu". It isn't clear from the standard features documentation that these are requirements. However, these tdescs would cause trouble in the VSX pseudo-register functions, so this patch will cause them to be rejected. gdb/ChangeLog: YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but without altivec or fpu. --- gdb/rs6000-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Forgot to press send on this one... :-) On 10/22/2018 11:32 PM, Pedro Franco de Carvalho wrote: > Currently rs6000_gdbarch_init will accept a tdesc with the > "org.gnu.gdb.power.vsx" feature but without the > "org.gnu.gdb.power.altivec" or "org.gnu.gdb.power.fpu". > > It isn't clear from the standard features documentation that these are > requirements. Is that something that should be fixed? Thanks, Pedro Alves
Pedro Alves <palves@redhat.com> writes: >> It isn't clear from the standard features documentation that these are >> requirements. > > Is that something that should be fixed? Yes, I can update the documentation to make this a requiremnt. Can I do it in a separate patch? Thanks! -- Pedro Franco de Carvalho
On 10/23/2018 07:45 PM, Pedro Franco de Carvalho wrote: > Pedro Alves <palves@redhat.com> writes: > >>> It isn't clear from the standard features documentation that these are >>> requirements. >> >> Is that something that should be fixed? > > Yes, I can update the documentation to make this a requiremnt. Can I do > it in a separate patch? Sure! Thanks, Pedro Alves
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 54591dbff6..7e41d8ff73 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -6042,7 +6042,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) valid_p &= tdesc_numbered_register (feature, tdesc_data, PPC_VSR0_UPPER_REGNUM + i, vsx_regs[i]); - if (!valid_p) + + if (!valid_p || !have_fpu || !have_altivec) { tdesc_data_cleanup (tdesc_data); return NULL;