From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16999 invoked by alias); 28 Dec 2007 04:33:20 -0000 Received: (qmail 16986 invoked by uid 22791); 28 Dec 2007 04:33:19 -0000 X-Spam-Check-By: sourceware.org Received: from igw3.br.ibm.com (HELO igw3.br.ibm.com) (32.104.18.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Dec 2007 04:33:12 +0000 Received: from mailhub3.br.ibm.com (unknown [9.18.232.110]) by igw3.br.ibm.com (Postfix) with ESMTP id DB5F4390043 for ; Fri, 28 Dec 2007 02:25:58 -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 lBS4X9W34051082 for ; Fri, 28 Dec 2007 02:33:09 -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 lBS4X9JF018596 for ; Fri, 28 Dec 2007 02:33:09 -0200 Received: from [9.8.6.168] ([9.8.6.168]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lBS4X84J018588; Fri, 28 Dec 2007 02:33:08 -0200 Subject: Re: [patch 2/2] Wrap-up expression support for DFP. From: Thiago Jung Bauermann To: Eli Zaretskii Cc: gdb-patches@sourceware.org In-Reply-To: References: <20071220054926.148275471@br.ibm.com> <20071220055107.194393592@br.ibm.com> Content-Type: multipart/mixed; boundary="=-9i22zGLH8SwMzezKNXEs" Date: Fri, 28 Dec 2007 06:16:00 -0000 Message-Id: <1198816387.12907.62.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 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/msg00430.txt.bz2 --=-9i22zGLH8SwMzezKNXEs Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 748 On Fri, 2007-12-21 at 18:04 +0200, Eli Zaretskii wrote: > > Date: Thu, 20 Dec 2007 03:49:28 -0200 > > From: Thiago Jung Bauermann > > > > - doesn't support conversion of 64-bit integers to decimal float, > > because of libdecnumber limitation; > > - error checking in decimal float operations ignore underflow, overflow > > and divide by zero to imitate binary float implementation; > > These limitations should be documented in the manual, I think: they > will affect GDB users, right? I couldn't find an appropriate place to put these in the manual, so I went ahead and created a new sub-section, under "Examining Data". What do you think? -- []'s Thiago Jung Bauermann Software Engineer IBM Linux Technology Center --=-9i22zGLH8SwMzezKNXEs Content-Disposition: attachment; filename=dfp-doc.diff Content-Type: text/x-patch; name=dfp-doc.diff; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 1947 2007-12-28 Thiago Jung Bauermann * gdb.texinfo (Examining Data): Add Decimal Floating Point format subsection. (Decimal Floating Point format): New subsection. Index: src-git/gdb/doc/gdb.texinfo =================================================================== --- src-git.orig/gdb/doc/gdb.texinfo 2007-12-28 01:11:37.000000000 -0200 +++ src-git/gdb/doc/gdb.texinfo 2007-12-28 02:16:56.000000000 -0200 @@ -5494,6 +5494,7 @@ Table}. * Character Sets:: Debugging programs that use a different character set than GDB does * Caching Remote Data:: Data caching for remote targets +* Decimal Floating Point:: Numbers in Decimal Floating Point format @end menu @node Expressions @@ -7473,6 +7474,28 @@ the data cache operation. @end table +@node Decimal Floating Point +@section Decimal Floating Point format +@cindex decimal floating point format + +@value{GDBN} can examine, set and perform computations with numbers in +decimal floating point format, which in the C language correspond to the +@code{_Decimal32}, @code{_Decimal64} and @code{_Decimal128} types as +specified by the extension to support decimal floating-point arithmetic. + +There are two encodings in use, depending on the architecture: BID (Binary +Integer Decimal) for x86 and x86-64, and DPD (Densely Packed Decimal) for +PowerPC. GDB will use the appropriate encoding for the configured target. + +Because of a limitation in libdecnumber, the library used by @value{GDBN} +to manipulate decimal floating point numbers, it is not possible to convert +(using a cast, for example) integers wider than 32-bit to decimal float. + +In addition, in order to imitate @value{GDBN}'s behaviour with binary floating +point computations, error checking in decimal float operations ignore underflow, +overflow and divide by zero exceptions. + + @node Macros @chapter C Preprocessor Macros --=-9i22zGLH8SwMzezKNXEs--