This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT


> 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.



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