From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31166 invoked by alias); 19 Jan 2008 00:04:47 -0000 Received: (qmail 31156 invoked by uid 22791); 19 Jan 2008 00:04:46 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 19 Jan 2008 00:04:26 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B528698009; Sat, 19 Jan 2008 00:04:24 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 71C1998005; Sat, 19 Jan 2008 00:04:24 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JG1CB-000460-4i; Fri, 18 Jan 2008 19:04:23 -0500 Date: Sat, 19 Jan 2008 00:04:00 -0000 From: Daniel Jacobowitz To: Luis Machado Cc: Thiago Jung Bauermann , gdb-patches@sourceware.org Subject: Re: Printing decimal128 types out of registers Message-ID: <20080119000423.GA15057@caradoc.them.org> Mail-Followup-To: Luis Machado , Thiago Jung Bauermann , gdb-patches@sourceware.org References: <1194460412.6686.34.camel@localhost> <1200596592.27321.20.camel@gargoyle> <1200598580.32125.11.camel@localhost.localdomain> <1200670954.10815.1.camel@gargoyle> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1200670954.10815.1.camel@gargoyle> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00484.txt.bz2 On Fri, Jan 18, 2008 at 01:42:34PM -0200, Luis Machado wrote: > - /* These are the only pseudo-registers we support. */ > - gdb_assert (tdep->ppc_ev0_regnum >= 0 > - && regnum >= tdep->ppc_ev0_regnum > - && regnum < tdep->ppc_ev0_regnum + 32); > + /* These are the e500 pseudo-registers. */ > + if (tdep->ppc_ev0_regnum < 0 > + && regnum < tdep->ppc_ev0_regnum > + && regnum >= tdep->ppc_ev0_regnum + 32) > + return -1; > + > + /* These are the ppc decimal128 pseudo-registers. */ > + if (tdep->ppc_dl0_regnum < 0 > + && regnum < tdep->ppc_dl0_regnum > + && regnum >= tdep->ppc_dl0_regnum + 16) > + return -1; This conversion is wrong - double-check the logic. > @@ -3380,6 +3492,12 @@ > else > have_altivec = 0; > > + feature = tdesc_find_feature (tdesc, > + "org.gnu.gdb.power.dfp128"); > + > + if (feature != NULL) > + have_dfp128 = 1; > + > /* On machines supporting the SPE APU, the general-purpose registers > are 64 bits long. There are SIMD vector instructions to treat them > as pairs of floats, but the rest of the instruction set treats them If the feature is not going to contain anything, I think it should be a property of the floating point feature rather than an independent feature - one which says "interpret these FP registers as DFP also", or something similar. That's how I would handle MMX versus SSE. However, since there is a useful software implementation that uses the same registers, Mark is right - we can just show them all the time. -- Daniel Jacobowitz CodeSourcery