#ifndef GENERATOR_FILE
#include <gmp.h>
#include <mpfr.h>
+#ifdef HAVE_mpc
+#include <mpc.h>
+# ifdef HAVE_mpc
+extern tree do_mpc_arg2 (tree, tree, tree, int, int (*)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t));
+# endif
+# if MPC_VERSION >= MPC_VERSION_NUM(0,6,1)
+# define HAVE_mpc_pow
+# endif
+# if MPC_VERSION >= MPC_VERSION_NUM(0,7,1)
+# define HAVE_mpc_arc
+# endif
+#endif
#endif
#include "machmode.h"
#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)
#define SIG_MSB ((unsigned long)1 << (HOST_BITS_PER_LONG - 1))
-struct real_value GTY(())
-{
+struct GTY(()) real_value {
/* Use the same underlying type for all bit-fields, so as to make
sure they're packed together, otherwise REAL_VALUE_TYPE_SIZE will
be miscomputed. */
extern const struct real_format decimal_single_format;
extern const struct real_format decimal_double_format;
extern const struct real_format decimal_quad_format;
+extern const struct real_format ieee_half_format;
+extern const struct real_format arm_half_format;
/* ====================================================================== */
extern REAL_VALUE_TYPE dconstm1;
extern REAL_VALUE_TYPE dconsthalf;
-/* Enumerate the special constant values we need. */
-enum real_value_const {
- rv_e,
- rv_third,
- rv_sqrt2,
- rv_max
-};
+#define dconst_e() (*dconst_e_ptr ())
+#define dconst_third() (*dconst_third_ptr ())
+#define dconst_sqrt2() (*dconst_sqrt2_ptr ())
+
+/* Function to return the real value special constant 'e'. */
+extern const REAL_VALUE_TYPE * dconst_e_ptr (void);
-/* Function to return a real value special constant. */
-extern const REAL_VALUE_TYPE * get_real_const (enum real_value_const);
+/* Returns the special REAL_VALUE_TYPE corresponding to 1/3. */
+extern const REAL_VALUE_TYPE * dconst_third_ptr (void);
+
+/* Returns the special REAL_VALUE_TYPE corresponding to sqrt(2). */
+extern const REAL_VALUE_TYPE * dconst_sqrt2_ptr (void);
/* Function to return a real value (not a tree node)
from a given integer constant. */
/* Replace R by 1/R in the given machine mode, if the result is exact. */
extern bool exact_real_inverse (enum machine_mode, REAL_VALUE_TYPE *);
+/* Return true if arithmetic on values in IMODE that were promoted
+ from values in TMODE is equivalent to direct arithmetic on values
+ in TMODE. */
+bool real_can_shorten_arithmetic (enum machine_mode, enum machine_mode);
+
/* In tree.c: wrap up a REAL_VALUE_TYPE in a tree node. */
extern tree build_real (tree, REAL_VALUE_TYPE);