From: Richard Henderson Date: Wed, 31 Jan 2001 19:49:00 +0000 (-0800) Subject: float-i128.h (FLT_EVAL_METHOD, [...]): Define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9e6ebe97b85b537c46b36e25900ed086cd52e61;p=gcc.git float-i128.h (FLT_EVAL_METHOD, [...]): Define. * config/float-i128.h (FLT_EVAL_METHOD, DECIMAL_DIG): Define. * config/float-i32.h: Likewise. * config/float-i64.h: Likewise. * config/float-sh.h: Likewise. * config/float-sparc.h: Likewise. From-SVN: r39383 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8da6c4e0de3..d0c5aaac1ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-01-31 Richard Henderson + + * config/float-i128.h (FLT_EVAL_METHOD, DECIMAL_DIG): Define. + * config/float-i32.h: Likewise. + * config/float-i64.h: Likewise. + * config/float-sh.h: Likewise. + * config/float-sparc.h: Likewise. + 2001-01-31 DJ Delorie * expmed.c (extract_bit_field): allow non-integral modes if we diff --git a/gcc/config/float-i128.h b/gcc/config/float-i128.h index 6a9dd48b1a3..f7ce3b34894 100644 --- a/gcc/config/float-i128.h +++ b/gcc/config/float-i128.h @@ -93,4 +93,31 @@ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 4932 +#if __STDC_VERSION__ >= 199901L + /* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + */ +# undef FLT_EVAL_METHOD +# define FLT_EVAL_METHOD 0 + + /* Number of decimal digits to enable rounding to the given number of + decimal digits without loss of precision. + if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) + else : ceil (1 + #mantissa * log10 (FLT_RADIX)) + where #mantissa is the number of bits in the mantissa of the widest + supported floating-point type. + */ +# undef DECIMAL_DIG +# define DECIMAL_DIG 36 + +#endif /* C99 */ + #endif /* _FLOAT_H_ */ diff --git a/gcc/config/float-i32.h b/gcc/config/float-i32.h index c834926b085..27e3394a5fb 100644 --- a/gcc/config/float-i32.h +++ b/gcc/config/float-i32.h @@ -93,4 +93,31 @@ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 38 +#if __STDC_VERSION__ >= 199901L + /* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + */ +# undef FLT_EVAL_METHOD +# define FLT_EVAL_METHOD 0 + + /* Number of decimal digits to enable rounding to the given number of + decimal digits without loss of precision. + if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) + else : ceil (1 + #mantissa * log10 (FLT_RADIX)) + where #mantissa is the number of bits in the mantissa of the widest + supported floating-point type. + */ +# undef DECIMAL_DIG +# define DECIMAL_DIG 9 + +#endif /* C99 */ + #endif /* _FLOAT_H_ */ diff --git a/gcc/config/float-i64.h b/gcc/config/float-i64.h index 7dbe4e92a10..b045fb35eef 100644 --- a/gcc/config/float-i64.h +++ b/gcc/config/float-i64.h @@ -93,4 +93,31 @@ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 308 +#if __STDC_VERSION__ >= 199901L + /* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + */ +# undef FLT_EVAL_METHOD +# define FLT_EVAL_METHOD 0 + + /* Number of decimal digits to enable rounding to the given number of + decimal digits without loss of precision. + if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) + else : ceil (1 + #mantissa * log10 (FLT_RADIX)) + where #mantissa is the number of bits in the mantissa of the widest + supported floating-point type. + */ +# undef DECIMAL_DIG +# define DECIMAL_DIG 17 + +#endif /* C99 */ + #endif /* _FLOAT_H_ */ diff --git a/gcc/config/float-m68k.h b/gcc/config/float-m68k.h index b36d447cb87..8294b66f3d0 100644 --- a/gcc/config/float-m68k.h +++ b/gcc/config/float-m68k.h @@ -94,4 +94,7 @@ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 4932 +/* ??? FLT_EVAL_METHOD depends on TARGET_68040_ONLY. We do not currently + have a preprocessor token that we can use to tell that this is on. */ + #endif /* _FLOAT_H_ */ diff --git a/gcc/config/float-sh.h b/gcc/config/float-sh.h index 446692428c2..7c074ac53cd 100644 --- a/gcc/config/float-sh.h +++ b/gcc/config/float-sh.h @@ -127,4 +127,31 @@ #undef LDBL_MAX_10_EXP #define LDBL_MAX_10_EXP 308 +#if __STDC_VERSION__ >= 199901L + /* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + */ +# undef FLT_EVAL_METHOD +# define FLT_EVAL_METHOD 0 + + /* Number of decimal digits to enable rounding to the given number of + decimal digits without loss of precision. + if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) + else : ceil (1 + #mantissa * log10 (FLT_RADIX)) + where #mantissa is the number of bits in the mantissa of the widest + supported floating-point type. + */ +# undef DECIMAL_DIG +# define DECIMAL_DIG 17 + +#endif /* C99 */ + #endif /* _FLOAT_H_ */ diff --git a/gcc/config/float-sparc.h b/gcc/config/float-sparc.h index 0138ecf884a..307528e07b3 100644 --- a/gcc/config/float-sparc.h +++ b/gcc/config/float-sparc.h @@ -119,4 +119,35 @@ #endif /* sparc32 */ +#if __STDC_VERSION__ >= 199901L + /* The floating-point expression evaluation method. + -1 indeterminate + 0 evaluate all operations and constants just to the range and + precision of the type + 1 evaluate operations and constants of type float and double + to the range and precision of the double type, evaluate + long double operations and constants to the range and + precision of the long double type + 2 evaluate all operations and constants to the range and + precision of the long double type + */ +# undef FLT_EVAL_METHOD +# define FLT_EVAL_METHOD 0 + + /* Number of decimal digits to enable rounding to the given number of + decimal digits without loss of precision. + if FLT_RADIX == 10^n: #mantissa * log10 (FLT_RADIX) + else : ceil (1 + #mantissa * log10 (FLT_RADIX)) + where #mantissa is the number of bits in the mantissa of the widest + supported floating-point type. + */ +# undef DECIMAL_DIG +# if LDBL_MANT_DIG == 53 +# define DECIMAL_DIG 17 +# else +# define DECIMAL_DIG 36 +# endif + +#endif /* C99 */ + #endif /* _FLOAT_H_ */