-struct real_value
-{
- enum real_value_class class : 2;
- unsigned int sign : 1;
- int exp : EXP_BITS;
- unsigned long sig[SIGSZ];
-};
-
-/* Describes the properties of the specific target format in use. */
-struct real_format
-{
- /* Move to and from the target bytes. */
- void (*encode) (const struct real_format *, long *,
- const struct real_value *);
- void (*decode) (const struct real_format *, struct real_value *,
- const long *);
-
- /* The radix of the exponent and digits of the significand. */
- int b;
-
- /* log2(b). */
- int log2_b;
-
- /* Size of the significand in digits of radix B. */
- int p;
-
- /* The minimum negative integer, x, such that b**(x-1) is normalized. */
- int emin;
-
- /* The maximum integer, x, such that b**(x-1) is representable. */
- int emax;
-
- /* Properties of the format. */
- bool has_nans;
- bool has_inf;
- bool has_denorm;
- bool has_signed_zero;
- bool qnan_msb_set;
-};
-
-
-static const struct real_format *fmt_for_mode[TFmode - QFmode + 1];
-
-
-static void get_zero PARAMS ((struct real_value *, int));
-static void get_canonical_qnan PARAMS ((struct real_value *, int));
-static void get_canonical_snan PARAMS ((struct real_value *, int));
-static void get_inf PARAMS ((struct real_value *, int));
-static void sticky_rshift_significand PARAMS ((struct real_value *,
- const struct real_value *,
- unsigned int));
-static void rshift_significand PARAMS ((struct real_value *,
- const struct real_value *,
- unsigned int));
-static void lshift_significand PARAMS ((struct real_value *,
- const struct real_value *,
- unsigned int));
-static void lshift_significand_1 PARAMS ((struct real_value *,
- const struct real_value *));
-static bool add_significands PARAMS ((struct real_value *r,
- const struct real_value *,
- const struct real_value *));
-static bool sub_significands PARAMS ((struct real_value *,
- const struct real_value *,
- const struct real_value *));
-static void neg_significand PARAMS ((struct real_value *,
- const struct real_value *));
-static int cmp_significands PARAMS ((const struct real_value *,
- const struct real_value *));
-static void set_significand_bit PARAMS ((struct real_value *, unsigned int));
-static void clear_significand_bit PARAMS ((struct real_value *, unsigned int));
-static bool test_significand_bit PARAMS ((struct real_value *, unsigned int));
-static void clear_significand_below PARAMS ((struct real_value *,
- unsigned int));
-static bool div_significands PARAMS ((struct real_value *,
- const struct real_value *,
- const struct real_value *));
-static void normalize PARAMS ((struct real_value *));
-
-static void do_add PARAMS ((struct real_value *, const struct real_value *,
- const struct real_value *, int));
-static void do_multiply PARAMS ((struct real_value *,
- const struct real_value *,
- const struct real_value *));
-static void do_divide PARAMS ((struct real_value *, const struct real_value *,
- const struct real_value *));
-static int do_compare PARAMS ((const struct real_value *,
- const struct real_value *, int));
-
-static const struct real_value * ten_to_ptwo PARAMS ((int));
-static const struct real_value * real_digit PARAMS ((int));
-
-static void round_for_format PARAMS ((const struct real_format *,
- struct real_value *));
+static void get_zero (REAL_VALUE_TYPE *, int);
+static void get_canonical_qnan (REAL_VALUE_TYPE *, int);
+static void get_canonical_snan (REAL_VALUE_TYPE *, int);
+static void get_inf (REAL_VALUE_TYPE *, int);
+static bool sticky_rshift_significand (REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *, unsigned int);
+static void rshift_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ unsigned int);
+static void lshift_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ unsigned int);
+static void lshift_significand_1 (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
+static bool add_significands (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *);
+static bool sub_significands (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *, int);
+static void neg_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
+static int cmp_significands (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
+static int cmp_significand_0 (const REAL_VALUE_TYPE *);
+static void set_significand_bit (REAL_VALUE_TYPE *, unsigned int);
+static void clear_significand_bit (REAL_VALUE_TYPE *, unsigned int);
+static bool test_significand_bit (REAL_VALUE_TYPE *, unsigned int);
+static void clear_significand_below (REAL_VALUE_TYPE *, unsigned int);
+static bool div_significands (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *);
+static void normalize (REAL_VALUE_TYPE *);
+
+static bool do_add (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *, int);
+static bool do_multiply (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *);
+static bool do_divide (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *,
+ const REAL_VALUE_TYPE *);
+static int do_compare (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int);
+static void do_fix_trunc (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
+
+static unsigned long rtd_divmod (REAL_VALUE_TYPE *, REAL_VALUE_TYPE *);
+
+static const REAL_VALUE_TYPE * ten_to_ptwo (int);
+static const REAL_VALUE_TYPE * ten_to_mptwo (int);
+static const REAL_VALUE_TYPE * real_digit (int);
+static void times_pten (REAL_VALUE_TYPE *, int);
+
+static void round_for_format (const struct real_format *, REAL_VALUE_TYPE *);