(get_field, put_field): Assert that the format is one we can handle.
Simplify logic accordingly.
(floatformat_normalize_byteorder): New function.
(convert_floatformat_to_doublest): Use floatformat_normalize_byteorder
to normalize and select modified byte order. Pass modified byte order
to get_field.
(floatformat_is_negative, floatformat_is_nan, floatformat_mantissa):
Likewise.
(convert_doublest_to_floatformat): Select an appropriate intermediate
byte order if necessary. Always convert to the final format before
returning.
* config/pa/xm-linux.h: Do not include "floatformat.h".
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros.
* config/i386/xm-i386.h: Do not include "floatformat.h".
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros.
* doublest.c (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT): Delete macros. Use
GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT and
GDB_HOST_LONG_DOUBLE_FORMAT instead.
* configure.in (GDB_HOST_FLOAT_FORMAT, GDB_HOST_DOUBLE_FORMAT)
(GDB_HOST_LONG_DOUBLE_FORMAT): Define.
* configure, config.in: Regenerate.
* configure.host (gdb_host_float_format, gdb_host_double_format)
(gdb_host_long_double_format): Set according to the host.
* doublest.c (convert_doublest_to_floatformat): When dealing
with the implied integer bit, only alter mant_bits if we are
processing a full 32 bits of mantissa.
(floatformat_from_length): New function.
(NAN): Define to 0.0 if not already defined.
(extract_floating): Rewrite to use floatformat_from_length. Warn
instead of error if LEN doesn't match a known floating-point type,
and return NaN (or 0.0 if NaN isn't available) in that case.
(store_floating): Likewise, but zero out the target byte-stream if
LEN doesn't match a known floating-point type.
(extract_typed_floating): Reformat a bit.
(store_typed_floating): Reformat a bit. Add comment about zeroing
out padding in the target buffer.
* doublest.h (extract_floating, store_floating): Fix comment about
deprecation of these functions. Add parameter names to prototypes.
floatformat_from_doublest. Make static.
(convert_floatformat_to_doublest): Rename floatformat_to_doublest.
Make static.
(floatformat_to_doublest): New function.
(floatformat_from_doublest): New function.
(host_float_format, host_double_format, host_long_double_format):
New static variables.
(store_floating, extract_floating): Always use
floatformat_to_doublest and floatformat_from_doublest.
* doublest.h (HOST_LONG_DOUBLE_FORMAT): Delete macro.
paramter a const void pointer.
(floatformat_from_doublest): Make IN const, Make OUT a void
pointer.
* doublest.c (floatformat_to_doublest): Update.
(floatformat_from_doublest): Update.
(extract_floating): Update.