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]
Other format: [Raw text]

[patch/rfc] Remove last IEEE_FLOAT use


Hello,

The attached removes the last remaning use of IEEE_FLOAT.  I think it is 
ok.  The relevant block is:

-   /* FIXME: kettenis/2001-01-20: The check for IEEE_FLOAT is probably
-      still necessary since GDB by default assumes that the target uses
-      the IEEE 754 representation for its floats and doubles.  Of
-      course this is all crock and should be cleaned up.  */
-
-   if (len == TARGET_FLOAT_BIT / TARGET_CHAR_BIT && IEEE_FLOAT)
-     fmt = TARGET_FLOAT_FORMAT;
-   else if (len == TARGET_DOUBLE_BIT / TARGET_CHAR_BIT && IEEE_FLOAT)
-     fmt = TARGET_DOUBLE_FORMAT;
-   else if (len == TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT)
-     fmt = TARGET_LONG_DOUBLE_FORMAT;
-

Thinking hard about it.  I can't see how IEEE_FLOAT can make a real 
difference.  In all likelyhood both the host and target have IEEE float. 
  If one of them doesn't, the floatformat stuff should be kicking in and 
correctly handle any needed conversion.

Anyway, the above code block is replaced by a call to a new function 
floatformat_from_type().

Any comments?

Andrew


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