From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9501 invoked by alias); 26 Dec 2007 11:22:45 -0000 Received: (qmail 9491 invoked by uid 22791); 26 Dec 2007 11:22:45 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Dec 2007 11:22:38 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw1.br.ibm.com (Postfix) with ESMTP id 0554F32C09D for ; Wed, 26 Dec 2007 09:02:38 -0200 (BRDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id lBQBMZhn3973224 for ; Wed, 26 Dec 2007 09:22:35 -0200 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lBQBMZdR003959 for ; Wed, 26 Dec 2007 09:22:35 -0200 Received: from [9.18.197.236] ([9.18.197.236]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lBQBMYuJ003948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 26 Dec 2007 09:22:35 -0200 Subject: [PING] PPC - Printing Decimal 128 types out of registers From: Luis Machado Reply-To: luisgpm@linux.vnet.ibm.com To: gdb-patches@sourceware.org In-Reply-To: <1196113213.4302.7.camel@localhost> References: <1194460412.6686.34.camel@localhost> <1196113213.4302.7.camel@localhost> Content-Type: text/plain Date: Wed, 26 Dec 2007 12:42:00 -0000 Message-Id: <1198668155.7822.4.camel@gargoyle> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit 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: 2007-12/txt/msg00414.txt.bz2 Hi, I'm looking forward to refresh this patch, would anyone have comments on it? It's been a while since i first submitted this one. Best regards, On Mon, 2007-11-26 at 19:40 -0200, Luis Machado wrote: > Hi there, > > Did anyone have a chance to go through this one? > > Regards, > Luis > > On Wed, 2007-11-07 at 16:33 -0200, Luis Machado wrote: > > Hi folks, > > > > I'm continuing the work to enhance DFP type support on GDB. DFP types > > are nativelly supported on the Power6 processor, thus they are stored in > > registers as so. This patch handles the printing and setting of > > Decimal128 types directly out of/in the registers. > > > > A Decimal128 type is stored using pairs of Floating Point registers, and > > it always starts in an even-numbered register. So, we could, for > > example, have a Decimal128 var taking up FPR0-FPR1, FPR10-FPR11, but > > never FPR1-FPR2 or FPR23-24. > > > > Right now GDB isn't able to print those vars as it doesn't know they > > take up more than one register. > > > > The idea to overcome this was to create a new set of 16 Decimal128-typed > > pseudo-registers called DL (Standing for "D"ecimal "L"ong Double) that > > would represent all 16 pairs of Floating Point Registers.. By using a > > pseudo-register mechanism, we're able to force the DL/FPR registers to > > map directly into the FPR/DL registers. > > > > Benefits of this change include: > > > > * Better printing support for Decimal128 types. We just print the > > register as is. No need to include casting tricks and arrays to print > > that value. > > > > * Straightforward way of setting Decimal128 values directly in the > > registers. We just "set $dl0=1.23dl", for example, and it's > > automatically set. > > > > * Overview of the state of 16 Decimal128 registers using the "info reg > > all" command. > > > > > > Supporting the patch there is also a number of other modifications, as > > listed: > > > > * DFP types are now global since they were included as predefined types > > in the "target-descriptions.c" file. > > > > * A simple testcase making sure the registers are working as expected. > > > > * Piece of documentation for the GDB manual. > > > > * Fix to display a 128-bit hex literal representation of Decimal128 > > types (using "info reg"). > > > > Also note that this support will be available for both ppc64 and ppc32. > > > > Looking forward to have comments and suggestions for improvements. > > > > Regards, > > Luis -- Luis Machado Software Engineer IBM Linux Technology Center