From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Andreas Schwab <schwab@suse.de>, gdb-patches@sourceware.org
Subject: Re: GDB/libiberty support for IBM long double
Date: Wed, 02 Jan 2008 16:17:00 -0000 [thread overview]
Message-ID: <1199290287.13275.3.camel@gargoyle> (raw)
In-Reply-To: <20071230043845.GC24220@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Hi,
> I wonder if we really need to use floatformat_to_double instead of
> floatformat_to_doublest for the split_half cases. It seems like that
> relies unnecessarily on the host double format. Do things work better
> if you use floatformat_to_doublest and DOUBLEST variables, instead
> of floatformat_to_double (likewise floatformat_from_doublest)?
The attached patch replaces the use of floatformat_to_double with
floatformat_to_doublest, fixing the problem.
There are other uses of floatformat_to_double in the function, by i'm
not sure if we should just replace every call of that function with the
"doublest" version (likewise with the floatformat_from_double ->
floatformat_from_doublest replacement).
Regards,
--
Luis Machado
Software Engineer
IBM Linux Technology Center
[-- Attachment #2: fix_long_double.diff --]
[-- Type: text/x-patch, Size: 1072 bytes --]
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.
Index: gdb/doublest.c
===================================================================
--- gdb.orig/doublest.c 2008-01-02 07:52:14.000000000 -0800
+++ gdb/doublest.c 2008-01-02 07:53:06.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;
}
next prev parent reply other threads:[~2008-01-02 16:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 0:25 Joseph S. Myers
2007-10-26 0:37 ` DJ Delorie
2007-10-29 1:31 ` Joseph S. Myers
2007-11-05 22:33 ` Ping " Joseph S. Myers
2007-11-07 22:43 ` Daniel Jacobowitz
2007-11-07 23:26 ` DJ Delorie
2007-11-09 1:07 ` Ulrich Weigand
2007-11-13 0:39 ` Joseph S. Myers
2007-11-13 13:56 ` Ulrich Weigand
2007-11-13 14:37 ` Joseph S. Myers
2007-11-13 15:15 ` DJ Delorie
2007-11-13 17:58 ` Ulrich Weigand
2007-12-28 1:20 ` Luis Machado
2007-12-28 12:29 ` Andreas Schwab
2007-12-28 21:40 ` Luis Machado
2007-12-30 11:25 ` Daniel Jacobowitz
2008-01-02 16:17 ` Luis Machado [this message]
2008-01-02 17:01 ` Daniel Jacobowitz
2008-01-02 18:12 ` Luis Machado
2008-01-02 18:32 ` Daniel Jacobowitz
2008-01-03 11:47 ` Luis Machado
2007-10-26 8:05 ` Mark Kettenis
2007-10-26 15:01 ` Joseph S. Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1199290287.13275.3.camel@gargoyle \
--to=luisgpm@linux.vnet.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox