aboutsummaryrefslogtreecommitdiff
path: root/gdb/doublest.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/doublest.h')
-rw-r--r--gdb/doublest.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/doublest.h b/gdb/doublest.h
index 058b4a3..983c7be 100644
--- a/gdb/doublest.h
+++ b/gdb/doublest.h
@@ -64,6 +64,17 @@ typedef double DOUBLEST;
# undef SCANF_HAS_LONG_DOUBLE
#endif
+/* Different kinds of floatformat numbers recognized by
+ floatformat_classify. To avoid portability issues, we use local
+ values instead of the C99 macros (FP_NAN et cetera). */
+enum float_kind {
+ float_nan,
+ float_infinite,
+ float_zero,
+ float_normal,
+ float_subnormal
+};
+
extern void floatformat_to_doublest (const struct floatformat *,
const void *in, DOUBLEST *out);
extern void floatformat_from_doublest (const struct floatformat *,
@@ -71,7 +82,8 @@ extern void floatformat_from_doublest (const struct floatformat *,
extern int floatformat_is_negative (const struct floatformat *,
const bfd_byte *);
-extern int floatformat_is_nan (const struct floatformat *, const bfd_byte *);
+extern enum float_kind floatformat_classify (const struct floatformat *,
+ const bfd_byte *);
extern const char *floatformat_mantissa (const struct floatformat *,
const bfd_byte *);