This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Remove last IEEE_FLOAT use
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 16 Jan 2002 01:23:40 -0500
- Subject: [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