From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9045 invoked by alias); 27 Mar 2007 16:29:46 -0000 Received: (qmail 9035 invoked by uid 22791); 27 Mar 2007 16:29: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; Tue, 27 Mar 2007 17:29:35 +0100 Received: from mailhub1.br.ibm.com (mailhub1 [9.18.232.109]) by igw1.br.ibm.com (Postfix) with ESMTP id 896B914818F for ; Tue, 27 Mar 2007 13:20:36 -0300 (BRT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l2RGTWV21220636 for ; Tue, 27 Mar 2007 13:29:32 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l2RGRXO1018538 for ; Tue, 27 Mar 2007 13:27:33 -0300 Received: from dyn532128.br.ibm.com ([9.18.238.251]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l2RGRXSf018535 for ; Tue, 27 Mar 2007 13:27:33 -0300 Subject: [patch 0/4] [RFC] decimal floating point support From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Content-Type: text/plain Date: Tue, 27 Mar 2007 16:29:00 -0000 Message-Id: <1175012961.21904.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 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-03/txt/msg00247.txt.bz2 Hi folks, I am re-submitting for review Wu Zhou's patch to add DFP (Decimal Floating Point) support to GDB (see [1] for details). The version I'm posting here is based on [2], only refreshed to apply to CVS HEAD from a few days ago and broken up into logical pieces to facilitate review. The testcases are taken from [3]. The code uses libdecnumber from the gcc svn repository. It can be fetched from svn://gcc.gnu.org/svn/gcc/trunk/libdecnumber. It is expected to be found by the Makefile in src/libdecnumber/. This is not complete yet because I'd like to add a way to have GDB correctly display floating point registers containing DFP values (in Power6, DFP and binary FP logic will share registers). Looking from the archives, the biggest concern regarding this patch has been on how to deal with endianness (see [4] and [5]). Here's how it's currently dealt with in the patch: Inside GDB the DFP value is always stored in target byte order. This is done by the exchange_dfp() function in dfp.c. Since libdecnumber currently uses big-endian regardless of the native byte order, the decimal_from_string() and decimal_to_string() functions use exchange_dfp() before or after calling libdecnumber functions. A later version of libdecnumber will use native byte order. I tested remotely debugging a big-endian target (ppc32) from a little endian host (i386) and it worked fine. [1] http://sourceware.org/ml/gdb-patches/2005-09/msg00268.html [2] http://sourceware.org/ml/gdb-patches/2006-08/msg00008.html [3] http://sourceware.org/ml/gdb-patches/2006-07/msg00090.html [4] http://sourceware.org/ml/gdb-patches/2006-07/msg00318.html [5] http://sourceware.org/ml/gdb-patches/2006-08/msg00049.html -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center