This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 2/2] Wrap-up expression support for DFP.


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 <bauerman@br.ibm.com>
> > 
> > - 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
2007-12-28  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* 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
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]