+/* The target format used for each floating point mode.
+ Float modes are followed by decimal float modes, with entries for
+ float modes indexed by (MODE - first float mode), and entries for
+ decimal float modes indexed by (MODE - first decimal float mode) +
+ the number of float modes. */
+extern const struct real_format *
+ real_format_for_mode[MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1
+ + MAX_MODE_DECIMAL_FLOAT - MIN_MODE_DECIMAL_FLOAT + 1];
+
+#define REAL_MODE_FORMAT(MODE) \
+ (real_format_for_mode[DECIMAL_FLOAT_MODE_P (MODE) \
+ ? (((MODE) - MIN_MODE_DECIMAL_FLOAT) \
+ + (MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1)) \
+ : ((MODE) - MIN_MODE_FLOAT)])
+
+#define FLOAT_MODE_FORMAT(MODE) \
+ (REAL_MODE_FORMAT (SCALAR_FLOAT_MODE_P (MODE)? (MODE) \
+ : GET_MODE_INNER (MODE)))
+
+/* The following macro determines whether the floating point format is
+ composite, i.e. may contain non-consecutive mantissa bits, in which
+ case compile-time FP overflow may not model run-time overflow. */
+#define MODE_COMPOSITE_P(MODE) \
+ (FLOAT_MODE_P (MODE) \
+ && FLOAT_MODE_FORMAT (MODE)->pnan < FLOAT_MODE_FORMAT (MODE)->p)
+
+/* Accessor macros for format properties. */
+#define MODE_HAS_NANS(MODE) \
+ (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_nans)
+#define MODE_HAS_INFINITIES(MODE) \
+ (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_inf)
+#define MODE_HAS_SIGNED_ZEROS(MODE) \
+ (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_signed_zero)
+#define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \
+ (FLOAT_MODE_P (MODE) \
+ && FLOAT_MODE_FORMAT (MODE)->has_sign_dependent_rounding)