From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31475 invoked by alias); 21 Jan 2008 17:31:00 -0000 Received: (qmail 31458 invoked by uid 22791); 21 Jan 2008 17:30:59 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Jan 2008 17:30:41 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m0LHUGio024300; Mon, 21 Jan 2008 18:30:17 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m0LHUGbu021315; Mon, 21 Jan 2008 18:30:16 +0100 (CET) Date: Mon, 21 Jan 2008 17:31:00 -0000 Message-Id: <200801211730.m0LHUGbu021315@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: bauerman@br.ibm.com CC: drow@false.org, luisgpm@linux.vnet.ibm.com, gdb-patches@sourceware.org In-reply-to: <1200927274.32125.36.camel@localhost.localdomain> (message from Thiago Jung Bauermann on Mon, 21 Jan 2008 12:54:34 -0200) Subject: Re: Printing decimal128 types out of registers References: <1194460412.6686.34.camel@localhost> <1200596592.27321.20.camel@gargoyle> <1200598580.32125.11.camel@localhost.localdomain> <1200670954.10815.1.camel@gargoyle> <20080119000423.GA15057@caradoc.them.org> <1200927274.32125.36.camel@localhost.localdomain> 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/msg00509.txt.bz2 > From: Thiago Jung Bauermann > Date: Mon, 21 Jan 2008 12:54:34 -0200 > > I was talking to Luis about this, and he suggested an approach other > than using pseudo registers: create a way to make GDB consider two > consecutive registers as contiguous data. Since there are other types > that are also passed in consecutive registers (e.g., long long, > soft-float, IBM lon double), this mechanism would be more useful. I > think this is a good idea. There's nothing wrong with the pseudo-register approach. In fact it is used on many other architectures. For example sparc64, where pairs of single-precision floating point numbers are used for double-precision, and four registers are used for quadruple precision. And on i386 we have the MMX registers that provide a different view on the floating-point registers. I only think adding the whole tdesc machinery around it is a bit too much. Now PowerPC assembler is silly, and alows you to specify registers by number instead of names. But most people actually rN for the general purpose registers and fN for the floating-point registers. If dlN is a widely accepted name for the decimal float registers, I think those registers should be added. > Perhaps some syntax could be created, like: > > (gdb) print {_Decimal128} $f2,$f3 > $1 = 1.2 > > What do you think? I'm not sure how this would fit into the expression parser. t might get really ugly.