This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT
- To: ac131313 at cygnus dot com
- Subject: Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- Date: Fri, 29 Jun 2001 12:00:41 +0300
- CC: gdb-patches at sources dot redhat dot com
- References: <3B3C1A5C.3060906@cygnus.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Fri, 29 Jun 2001 02:04:12 -0400
> From: Andrew Cagney <ac131313@cygnus.com>
>
> This patch eliminates the short cut. Instead the conversion is always
> routed through floatformat_{to,from}_doublest(). The most telling
> comment and the reason this will probably catch a few eyebrows can be
> found in i387-tdep.c:
>
> ! /* Avoid call to floatformat_to_doublest if possible to preserve as
> ! much information as possible. */
>
> To me, the comment doesn't make sense. If sizeof (host long double) ==
> size of (target long double) and information is still being lost then I
> think floatformat_* has a bug.
You could lose information if the original value's bit pattern is not
a valid FP number. Does floatformat_to_doublest handle these
situations 110% correctly? I see at least one FIXME comment in the
code there.
If there are some pitfalls in what floatformat_to_doublest do, then I
think it's justified to favor native debugging by avoiding those
pitfalls.