This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB/libiberty support for IBM long double
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 03 Jan 2008 09:40:56 -0200
- Subject: Re: GDB/libiberty support for IBM long double
- References: <200711090107.lA917ZGs027733@d12av02.megacenter.de.ibm.com> <Pine.LNX.4.64.0711130038330.29493@digraph.polyomino.org.uk> <1198783208.7822.51.camel@gargoyle> <jeprwrf6rp.fsf@sykes.suse.de> <1198852288.7822.56.camel@gargoyle> <20071230043845.GC24220@caradoc.them.org> <1199290287.13275.3.camel@gargoyle> <20080102165519.GA26437@caradoc.them.org> <1199297126.13275.7.camel@gargoyle> <20080102182706.GA1184@caradoc.them.org>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
Thanks Daniel. I've checked in this version.
On Wed, 2008-01-02 at 13:27 -0500, Daniel Jacobowitz wrote:
> On Wed, Jan 02, 2008 at 04:05:26PM -0200, Luis Machado wrote:
> > 2008-01-02 Luis Machado <luisgpm@br.ibm.com>
> >
> > * doublest.c (convert_floatformat_to_doublest): Call
> > floatformat_to_doublest instead of floatformat_to_double and use
> > DOUBLEST variables.
> > (convert_doublest_to_floatformat): Call floatformat_from_doublest
> > instead of floatformat_from_double and use DOUBLEST variables.
>
> OK.
>
--
Luis Machado
Software Engineer
IBM Linux Technology Center
2008-01-03 Luis Machado <luisgpm@br.ibm.com>
* doublest.c (convert_floatformat_to_doublest): Call
floatformat_to_doublest instead of floatformat_to_double and use
DOUBLEST variables.
(convert_doublest_to_floatformat): Call floatformat_from_doublest
instead of floatformat_from_double and use DOUBLEST variables.
Index: gdb/doublest.c
===================================================================
--- gdb.orig/doublest.c 2008-01-02 08:24:41.000000000 -0800
+++ gdb/doublest.c 2008-01-02 09:53:55.000000000 -0800
@@ -202,19 +202,19 @@
if (fmt->split_half)
{
- double dtop, dbot;
- floatformat_to_double (fmt->split_half, ufrom, &dtop);
+ DOUBLEST dtop, dbot;
+ floatformat_to_doublest (fmt->split_half, ufrom, &dtop);
/* Preserve the sign of 0, which is the sign of the top
half. */
if (dtop == 0.0)
{
- *to = (DOUBLEST) dtop;
+ *to = dtop;
return;
}
- floatformat_to_double (fmt->split_half,
+ floatformat_to_doublest (fmt->split_half,
ufrom + fmt->totalsize / FLOATFORMAT_CHAR_BIT / 2,
&dbot);
- *to = (DOUBLEST) dtop + (DOUBLEST) dbot;
+ *to = dtop + dbot;
return;
}
@@ -417,7 +417,7 @@
removed via storing in memory, and so the top half really is
the result of converting to double. */
static volatile double dtop, dbot;
- double dtopnv, dbotnv;
+ DOUBLEST dtopnv, dbotnv;
dtop = (double) dfrom;
/* If the rounded top half is Inf, the bottom must be 0 not NaN
or Inf. */
@@ -427,8 +427,8 @@
dbot = (double) (dfrom - (DOUBLEST) dtop);
dtopnv = dtop;
dbotnv = dbot;
- floatformat_from_double (fmt->split_half, &dtopnv, uto);
- floatformat_from_double (fmt->split_half, &dbotnv,
+ floatformat_from_doublest (fmt->split_half, &dtopnv, uto);
+ floatformat_from_doublest (fmt->split_half, &dbotnv,
(uto
+ fmt->totalsize / FLOATFORMAT_CHAR_BIT / 2));
return;