diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b7215340bb..c414447661c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2010-10-12 Nathan Froyd + + * libgcc2.h: Use __SIZEOF_DOUBLE__ instead of + LIBGCC2_DOUBLE_TYPE_SIZE. + (LIBGCC2_DOUBLE_TYPE_SIZE): Delete. + * config/fixed-bit.h: Likewise. + * config/rx/rx.h (LIBGCC2_DOUBLE_TYPE_SIZE): Delete. + * config/sh/sh.h (LIBGCC2_DOUBLE_TYPE_SIZE): Delete. + * system.h (LIBGCC2_DOUBLE_TYPE_SIZE): Poison. + * doc/tm.texi.in (LIBGCC2_HAS_DF_MODE): Use DOUBLE_TYPE_SIZE. + (DF_SIZE): Likewise. + * doc/tm.texi: Regenerate. + 2010-10-12 Nathan Froyd * config/rs6000/predicates.md (scc_rev_comparison_operator): New. diff --git a/gcc/config/fixed-bit.h b/gcc/config/fixed-bit.h index 0ee8af3dcdf..ce5b96e7850 100644 --- a/gcc/config/fixed-bit.h +++ b/gcc/config/fixed-bit.h @@ -49,9 +49,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN #endif -#ifndef LIBGCC2_DOUBLE_TYPE_SIZE -#define LIBGCC2_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE -#endif #ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE #endif @@ -63,7 +60,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef LIBGCC2_HAS_DF_MODE #define LIBGCC2_HAS_DF_MODE \ (BITS_PER_UNIT == 8 \ - && (LIBGCC2_DOUBLE_TYPE_SIZE == 64 \ + && (__SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 \ || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64)) #endif diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h index 140d6d41fe2..7da4de1d6ea 100644 --- a/gcc/config/rx/rx.h +++ b/gcc/config/rx/rx.h @@ -115,11 +115,9 @@ extern enum rx_cpu_types rx_cpu_type; #ifdef __RX_32BIT_DOUBLES__ #define LIBGCC2_HAS_DF_MODE 0 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 32 -#define LIBGCC2_DOUBLE_TYPE_SIZE 32 #else #define LIBGCC2_HAS_DF_MODE 1 #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#define LIBGCC2_DOUBLE_TYPE_SIZE 64 #endif #define DEFAULT_SIGNED_CHAR 0 diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 01236c18ab4..8f149dc63a6 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -2028,12 +2028,6 @@ struct sh_args { floating point types equivalent to `float'. */ #define DOUBLE_TYPE_SIZE ((TARGET_SH2E && ! TARGET_SH4 && ! TARGET_SH2A_DOUBLE) ? 32 : 64) -#if defined(__SH2E__) || defined(__SH3E__) || defined( __SH2A_SINGLE_ONLY__) || defined( __SH4_SINGLE_ONLY__) -#define LIBGCC2_DOUBLE_TYPE_SIZE 32 -#else -#define LIBGCC2_DOUBLE_TYPE_SIZE 64 -#endif - /* 'char' is signed by default. */ #define DEFAULT_SIGNED_CHAR 1 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 55a98972bc8..a268617f7a1 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1628,10 +1628,10 @@ default is @code{LONG_DOUBLE_TYPE_SIZE}. @end defmac @defmac LIBGCC2_HAS_DF_MODE -Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor +Define this macro if neither @code{DOUBLE_TYPE_SIZE} nor @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is @code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a} -anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE} +anyway. If you don't define this and either @code{DOUBLE_TYPE_SIZE} or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64 then the default is 1, otherwise it is 0. @end defmac @@ -1660,7 +1660,7 @@ if the defaults in @file{libgcc2.h} are inappropriate. By default, @code{FLT_MANT_DIG} is used for @code{SF_SIZE}, @code{LDBL_MANT_DIG} for @code{XF_SIZE} and @code{TF_SIZE}, and @code{DBL_MANT_DIG} or @code{LDBL_MANT_DIG} for @code{DF_SIZE} according to whether -@code{LIBGCC2_DOUBLE_TYPE_SIZE} or +@code{DOUBLE_TYPE_SIZE} or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64. @end defmac diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 84a071b6242..74cf927f398 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -1626,10 +1626,10 @@ default is @code{LONG_DOUBLE_TYPE_SIZE}. @end defmac @defmac LIBGCC2_HAS_DF_MODE -Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor +Define this macro if neither @code{DOUBLE_TYPE_SIZE} nor @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is @code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a} -anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE} +anyway. If you don't define this and either @code{DOUBLE_TYPE_SIZE} or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64 then the default is 1, otherwise it is 0. @end defmac @@ -1658,7 +1658,7 @@ if the defaults in @file{libgcc2.h} are inappropriate. By default, @code{FLT_MANT_DIG} is used for @code{SF_SIZE}, @code{LDBL_MANT_DIG} for @code{XF_SIZE} and @code{TF_SIZE}, and @code{DBL_MANT_DIG} or @code{LDBL_MANT_DIG} for @code{DF_SIZE} according to whether -@code{LIBGCC2_DOUBLE_TYPE_SIZE} or +@code{DOUBLE_TYPE_SIZE} or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64. @end defmac diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h index f344917dad1..d2d86ef8a2d 100644 --- a/gcc/libgcc2.h +++ b/gcc/libgcc2.h @@ -43,9 +43,6 @@ extern void __eprintf (const char *, const char *, unsigned int, const char *) #define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN #endif -#ifndef LIBGCC2_DOUBLE_TYPE_SIZE -#define LIBGCC2_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE -#endif #ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE #endif @@ -57,7 +54,7 @@ extern void __eprintf (const char *, const char *, unsigned int, const char *) #ifndef LIBGCC2_HAS_DF_MODE #define LIBGCC2_HAS_DF_MODE \ (BITS_PER_UNIT == 8 \ - && (LIBGCC2_DOUBLE_TYPE_SIZE == 64 \ + && (__SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 \ || LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64)) #endif @@ -81,7 +78,7 @@ extern void __eprintf (const char *, const char *, unsigned int, const char *) #ifndef DF_SIZE #if LIBGCC2_HAS_DF_MODE -#if LIBGCC2_DOUBLE_TYPE_SIZE == 64 +#if __SIZEOF_DOUBLE__ * __CHAR_BIT__ == 64 #define DF_SIZE DBL_MANT_DIG #elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 #define DF_SIZE LDBL_MANT_DIG diff --git a/gcc/system.h b/gcc/system.h index 4bfebaf7331..5131fed9ff9 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -784,6 +784,9 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; TARGET_PROMOTE_FUNCTION_ARGS TARGET_PROMOTE_FUNCTION_RETURN \ LANG_HOOKS_MISSING_ARGUMENT LANG_HOOKS_HASH_TYPES +/* Hooks into libgcc2. */ + #pragma GCC poison LIBGCC2_DOUBLE_TYPE_SIZE + /* Miscellaneous macros that are no longer used. */ #pragma GCC poison USE_MAPPED_LOCATION