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: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 29 Jun 2001 13:15:34 +0100
- cc: gdb-patches at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
> Hello,
>
> The attatched should catch a few eyebrows :-)
>
> The existing GDB tries to be smart about converting host/target floating
> point values - if it thinks that host-float == target-float then it just
> does a move instead of a conversion.
>
> 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.
>
> As a side effect it also cleans up the ARM target-float ->
> target->double conversion so that it is more portable (well I think it is).
>
> Comments? Approval for the ARM part? I can/should separate the arm
> part out.
The ARM part looks like a good move to me (not that that need count for
anything). Overall, it all looks pretty sensible...
R.