From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Earnshaw To: Andrew Cagney Cc: gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com Subject: Re: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT Date: Fri, 29 Jun 2001 05:16:00 -0000 Message-id: <200106291215.NAA02034@cam-mail2.cambridge.arm.com> References: <3B3C1A5C.3060906@cygnus.com> X-SW-Source: 2001-06/msg00515.html > 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.