/* Definitions of floating-point access for GNU compiler.
- Copyright (C) 1989, 1991, 1994, 1996, 1997, 1998,
- 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1991, 1994, 1996, 1997, 1998, 1999,
+ 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
};
#define SIGNIFICAND_BITS (128 + HOST_BITS_PER_LONG)
-#define EXP_BITS (32 - 3)
+#define EXP_BITS (32 - 5)
#define MAX_EXP ((1 << (EXP_BITS - 1)) - 1)
#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)
#define SIG_MSB ((unsigned long)1 << (HOST_BITS_PER_LONG - 1))
{
ENUM_BITFIELD (real_value_class) class : 2;
unsigned int sign : 1;
+ unsigned int signalling : 1;
+ unsigned int canonical : 1;
signed int exp : EXP_BITS;
unsigned long sig[SIGSZ];
};
/* Size of the significand in digits of radix B. */
int p;
+ /* Size of the significant of a NaN, in digits of radix B. */
+ int pnan;
+
/* 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;
+ /* The bit position of the sign bit, or -1 for a complex encoding. */
+ int signbit;
+
/* Properties of the format. */
bool has_nans;
bool has_inf;
extern bool real_nan PARAMS ((REAL_VALUE_TYPE *, const char *,
int, enum machine_mode));
+extern void real_maxval PARAMS ((REAL_VALUE_TYPE *, int,
+ enum machine_mode));
+
extern void real_2expN PARAMS ((REAL_VALUE_TYPE *, int));
extern unsigned int real_hash PARAMS ((const REAL_VALUE_TYPE *));
/* Target formats defined in real.c. */
extern const struct real_format ieee_single_format;
+extern const struct real_format mips_single_format;
extern const struct real_format ieee_double_format;
+extern const struct real_format mips_double_format;
extern const struct real_format ieee_extended_motorola_format;
extern const struct real_format ieee_extended_intel_96_format;
+extern const struct real_format ieee_extended_intel_96_round_53_format;
extern const struct real_format ieee_extended_intel_128_format;
extern const struct real_format ibm_extended_format;
+extern const struct real_format mips_extended_format;
extern const struct real_format ieee_quad_format;
+extern const struct real_format mips_quad_format;
extern const struct real_format vax_f_format;
extern const struct real_format vax_d_format;
extern const struct real_format vax_g_format;
extern const struct real_format i370_double_format;
extern const struct real_format c4x_single_format;
extern const struct real_format c4x_extended_format;
+extern const struct real_format real_internal_format;
/* ====================================================================== */
/* **** End of software floating point emulator interface macros **** */
\f
-/* Constant real values 0, 1, 2, and -1. */
+/* Constant real values 0, 1, 2, -1, -2 and 0.5. */
extern REAL_VALUE_TYPE dconst0;
extern REAL_VALUE_TYPE dconst1;
extern REAL_VALUE_TYPE dconst2;
extern REAL_VALUE_TYPE dconstm1;
+extern REAL_VALUE_TYPE dconstm2;
+extern REAL_VALUE_TYPE dconsthalf;
/* Function to return a real value (not a tree node)
from a given integer constant. */
/* In tree.c: wrap up a REAL_VALUE_TYPE in a tree node. */
extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE));
+/* Calculate R as the square root of X in the given machine mode. */
+extern bool real_sqrt PARAMS ((REAL_VALUE_TYPE *,
+ enum machine_mode,
+ const REAL_VALUE_TYPE *));
+
+/* Calculate R as X raised to the integer exponent N in mode MODE. */
+extern bool real_powi PARAMS ((REAL_VALUE_TYPE *,
+ enum machine_mode,
+ const REAL_VALUE_TYPE *,
+ HOST_WIDE_INT));
#endif /* ! GCC_REAL_H */