aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.h
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2017-09-27 19:03:36 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2017-09-27 19:03:36 +0200
commit0db7851f9f490f0b60689df5a218ccce60896e3d (patch)
treeccce381147799faf5e545b0364d041898a603605 /gdb/doublest.h
parent77b7c781e9f03cdd903dad76f47ea0bb25277b06 (diff)
downloadgdb-0db7851f9f490f0b60689df5a218ccce60896e3d.zip
gdb-0db7851f9f490f0b60689df5a218ccce60896e3d.tar.gz
gdb-0db7851f9f490f0b60689df5a218ccce60896e3d.tar.bz2
Simplify floatformat_from_type
For historical reasons, the TYPE_FLOATFORMAT element is still set to hold an array of two floatformat structs, one for big-endian and the other for little-endian. When accessing the element via floatformat_from_type, the code would check the type's byte order and return the appropriate floatformat. However, these days this is quite unnecessary, since the type's byte order is already known at the time the type is allocated and the floatformat is installed into TYPE_FLOATFORMAT. Therefore, we can just install the correct version here. Also, moves the (now trivially simple) floatformat_from_type accessor to gdbtypes.{c,h}, since it doesn't really need to be in doublest.c now. gdb/ChangeLog 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com> * doublest.h (floatformat_from_type): Move to gdbtypes.h. * doublest.c (floatformat_from_type): Move to gdbtypes.c. * gdbtypes.h (union type_specific): Make field floatformat hold just a single struct floatformat, not an array. (floatformat_from_type): Move here. * gdbtypes.c (floatformat_from_type): Move here. Update to changed TYPE_FLOATFORMAT definition. (verify_floatformat): Update to changed TYPE_FLOATFORMAT. (recursive_dump_type): Likewise. (init_float_type): Install correct floatformat for byte order. (arch_float_type): Likewise.
Diffstat (limited to 'gdb/doublest.h')
-rw-r--r--gdb/doublest.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/doublest.h b/gdb/doublest.h
index 23c6ee5..a22baef 100644
--- a/gdb/doublest.h
+++ b/gdb/doublest.h
@@ -83,12 +83,6 @@ extern enum float_kind floatformat_classify (const struct floatformat *,
extern const char *floatformat_mantissa (const struct floatformat *,
const bfd_byte *);
-/* Given TYPE, return its floatformat. TYPE_FLOATFORMAT() may return
- NULL. type_floatformat() detects that and returns a floatformat
- based on the type size when FLOATFORMAT is NULL. */
-
-const struct floatformat *floatformat_from_type (const struct type *type);
-
/* Return the floatformat's total size in host bytes. */
extern size_t floatformat_totalsize_bytes (const struct floatformat *fmt);