From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: gdb-patches@sources.redhat.com Subject: [rfa(arm)/rfc] Eliminate HOST_{FLOAT,DOUBLE,...}_FORMAT Date: Thu, 28 Jun 2001 23:04:00 -0000 Message-id: <3B3C1A5C.3060906@cygnus.com> X-SW-Source: 2001-06/msg00504.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. Andrew