diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96a5d7a66e4a..f91e231f2e6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,30 @@ +2014-09-22 Joseph Myers + + * doc/tm.texi.in (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * doc/tm.texi: Regenerate. + * system.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Poison. + * config/alpha/alpha.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/i386/i386-interix.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): + Remove. + * config/i386/i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/i386/rtemself.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/ia64/ia64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/m68k/m68k.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): + Remove. + * config/mips/mips.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/mips/n32-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/msp430/msp430.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/rl78/rl78.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/rs6000/rs6000.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/rx/rx.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/s390/s390.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/sparc/freebsd.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/sparc/linux.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/sparc/linux64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + * config/sparc/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): + Remove. + 2014-09-22 Jan Hubicka * tree-ssa-ccp.c (prop_value_d): Rename to ... diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index efe74173f17f..468c78bfa264 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2014-09-22 Joseph Myers + + * c-cppbuiltin.c (c_cpp_builtins): Define + __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point + modes. + 2014-09-18 Joseph Myers * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__ diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 9e2040b67d54..6748db435ede 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -978,6 +978,30 @@ c_cpp_builtins (cpp_reader *pfile) else gcc_unreachable (); builtin_define_with_value (macro_name, suffix, 0); + bool excess_precision = false; + if (TARGET_FLT_EVAL_METHOD != 0 + && mode != TYPE_MODE (long_double_type_node) + && (mode == TYPE_MODE (float_type_node) + || mode == TYPE_MODE (double_type_node))) + switch (TARGET_FLT_EVAL_METHOD) + { + case -1: + case 2: + excess_precision = true; + break; + + case 1: + excess_precision = mode == TYPE_MODE (float_type_node); + break; + + default: + gcc_unreachable (); + } + macro_name = (char *) alloca (strlen (name) + + sizeof ("__LIBGCC__EXCESS_" + "PRECISION__")); + sprintf (macro_name, "__LIBGCC_%s_EXCESS_PRECISION__", name); + builtin_define_with_int_value (macro_name, excess_precision); } /* For libgcc crtstuff.c and libgcc2.c. */ diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 88816f3148c0..ea5fd13af191 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -203,14 +203,6 @@ extern enum alpha_fp_trap_mode alpha_fptm; #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_128__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - /* Work around target_flags dependency in ada/targtyps.c. */ #define WIDEST_HARDWARE_FP_SIZE 64 diff --git a/gcc/config/i386/i386-interix.h b/gcc/config/i386/i386-interix.h index 49aef842f762..98b8ae146600 100644 --- a/gcc/config/i386/i386-interix.h +++ b/gcc/config/i386/i386-interix.h @@ -140,8 +140,6 @@ do { \ /* Turn off long double being 96 bits. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 64 -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 #define IX86_NO_LIBGCC_TFMODE diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 2c641628d74c..63005460783f 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -694,16 +694,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define LONG_DOUBLE_TYPE_SIZE \ (TARGET_LONG_DOUBLE_64 ? 64 : (TARGET_LONG_DOUBLE_128 ? 128 : 80)) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_64__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#elif defined (__LONG_DOUBLE_128__) -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 -#endif - #define WIDEST_HARDWARE_FP_SIZE 80 #if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h index ce6d762948d7..1461a9e9c4d1 100644 --- a/gcc/config/i386/rtemself.h +++ b/gcc/config/i386/rtemself.h @@ -32,11 +32,4 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 80 : 64) -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#ifdef _SOFT_FLOAT -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 -#endif - #define IX86_NO_LIBGCC_TFMODE diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index 4cc80a9c8eab..372bee740a7d 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -253,10 +253,6 @@ while (0) : TARGET_ABI_OPEN_VMS ? 64 \ : 80) -/* We always want the XFmode operations from libgcc2.c, except on VMS - where this yields references to unimplemented "insns". */ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_ABI_OPEN_VMS ? 64 : 80) - #define DEFAULT_SIGNED_CHAR 1 diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 5a6ceb503008..a621b627a39e 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -280,14 +280,6 @@ along with GCC; see the file COPYING3. If not see #define LONG_DOUBLE_TYPE_SIZE \ ((TARGET_COLDFIRE || TARGET_FIDOA) ? 64 : 80) -/* We need to know the size of long double at compile-time in libgcc2. */ - -#if defined(__mcoldfire__) || defined(__mfido__) -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 -#endif - /* Set the value of FLT_EVAL_METHOD in float.h. When using 68040 fp instructions, we get proper intermediate rounding, otherwise we get extended precision results. */ diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h index be891933841f..eade5b419214 100644 --- a/gcc/config/m68k/netbsd-elf.h +++ b/gcc/config/m68k/netbsd-elf.h @@ -39,13 +39,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_68020 ? 80 : 64) -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#ifdef __mc68010__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 -#endif - #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "netbsd_entry_point", NETBSD_ENTRY_POINT }, diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 9a15287cdb11..c7b998bf758e 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1399,15 +1399,6 @@ struct mips_cpu_info { support long double, we also want a 128-bit integer type. */ #define MAX_FIXED_MODE_SIZE LONG_DOUBLE_TYPE_SIZE -#ifdef IN_LIBGCC2 -#if ((defined _ABIN32 && _MIPS_SIM == _ABIN32) \ - || (defined _ABI64 && _MIPS_SIM == _ABI64)) -# define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -# else -# define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -# endif -#endif - /* Width in bits of a pointer. */ #ifndef POINTER_SIZE #define POINTER_SIZE ((TARGET_LONG64 && TARGET_64BIT) ? 64 : 32) diff --git a/gcc/config/mips/n32-elf.h b/gcc/config/mips/n32-elf.h index cb0cbbf95608..a611a9e404af 100644 --- a/gcc/config/mips/n32-elf.h +++ b/gcc/config/mips/n32-elf.h @@ -28,8 +28,3 @@ along with GCC; see the file COPYING3. If not see /* Force n32 to use 64-bit long doubles. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 64 - -#ifdef IN_LIBGCC2 -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index 068bdada814e..70196e2e7d97 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -111,8 +111,6 @@ extern bool msp430x; #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 64 /*DOUBLE_TYPE_SIZE*/ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 - #define DEFAULT_SIGNED_CHAR 0 #define STRICT_ALIGNMENT 1 diff --git a/gcc/config/rl78/rl78.h b/gcc/config/rl78/rl78.h index 947c40846613..c3cae69275a6 100644 --- a/gcc/config/rl78/rl78.h +++ b/gcc/config/rl78/rl78.h @@ -98,8 +98,6 @@ #define DOUBLE_TYPE_SIZE 32 /*64*/ #define LONG_DOUBLE_TYPE_SIZE 64 /*DOUBLE_TYPE_SIZE*/ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 - #define DEFAULT_SIGNED_CHAR 0 #define STRICT_ALIGNMENT 1 diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 8a0fcab63f8b..1fd4f2aa021c 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -820,14 +820,6 @@ extern unsigned char rs6000_recip_bits[]; words. */ #define LONG_DOUBLE_TYPE_SIZE rs6000_long_double_type_size -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_128__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - /* Work around rs6000_long_double_type_size dependency in ada/targtyps.c. */ #define WIDEST_HARDWARE_FP_SIZE 64 diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h index 2a008f7aa538..57a24e6dd209 100644 --- a/gcc/config/rx/rx.h +++ b/gcc/config/rx/rx.h @@ -130,12 +130,6 @@ #define DOUBLE_TYPE_SIZE (TARGET_64BIT_DOUBLES ? 64 : 32) #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE -#ifdef __RX_32BIT_DOUBLES__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 32 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - #define DEFAULT_SIGNED_CHAR 0 /* RX load/store instructions can handle unaligned addresses. */ diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 2f2139e919b1..c5edace139bd 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -252,14 +252,6 @@ enum processor_flags #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_128__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - /* Work around target_flags dependency in ada/targtyps.c. */ #define WIDEST_HARDWARE_FP_SIZE 64 diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h index 371312bb4df4..d89f11491f5a 100644 --- a/gcc/config/sparc/freebsd.h +++ b/gcc/config/sparc/freebsd.h @@ -71,14 +71,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#if defined(__arch64__) || defined(__LONG_DOUBLE_128__) -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - /* Definitions for 64-bit SPARC running systems with ELF. */ #define TARGET_ELF 1 diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index c54ba2cb51cf..277e49a5f498 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -122,14 +122,6 @@ do { \ SPARC ABI says that long double is 4 words. */ #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#ifdef __LONG_DOUBLE_128__ -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - #undef DITF_CONVERSION_LIBFUNCS #define DITF_CONVERSION_LIBFUNCS 1 diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index f00fb42ffab0..7f1288126c0c 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -70,14 +70,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -/* Define this to set long double type size to use in libgcc2.c, which can - not depend on target_flags. */ -#if defined(__arch64__) || defined(__LONG_DOUBLE_128__) -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "\ %{posix:-D_POSIX_SOURCE} \ diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h index 949d333f67c9..5c74464269c6 100644 --- a/gcc/config/sparc/netbsd-elf.h +++ b/gcc/config/sparc/netbsd-elf.h @@ -168,12 +168,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) -#if defined(__arch64__) || defined(__LONG_DOUBLE_128__) -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 -#else -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 -#endif - #undef CC1_SPEC #if DEFAULT_ARCH32_P #define CC1_SPEC CC1_SPEC32 @@ -195,9 +189,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 128 -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 - #undef CC1_SPEC #define CC1_SPEC CC1_SPEC64 @@ -210,9 +201,6 @@ along with GCC; see the file COPYING3. If not see #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE 64 -#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 - #undef CC1_SPEC #define CC1_SPEC CC1_SPEC32 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 396909f2619f..10af50e1b8be 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1542,13 +1542,6 @@ the target machine. If you don't define this, the default is @code{BITS_PER_UNIT * 16}. @end defmac -@defmac LIBGCC2_LONG_DOUBLE_TYPE_SIZE -Define this macro if @code{LONG_DOUBLE_TYPE_SIZE} is not constant or -if you want routines in @file{libgcc2.a} for a size other than -@code{LONG_DOUBLE_TYPE_SIZE}. If you don't define this, the -default is @code{LONG_DOUBLE_TYPE_SIZE}. -@end defmac - @defmac LIBGCC2_GNU_PREFIX This macro corresponds to the @code{TARGET_LIBFUNC_GNU_PREFIX} target hook and should be defined if that hook is overriden to be true. It diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 798c1aad5e2f..f6f241b5093f 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -1384,13 +1384,6 @@ the target machine. If you don't define this, the default is @code{BITS_PER_UNIT * 16}. @end defmac -@defmac LIBGCC2_LONG_DOUBLE_TYPE_SIZE -Define this macro if @code{LONG_DOUBLE_TYPE_SIZE} is not constant or -if you want routines in @file{libgcc2.a} for a size other than -@code{LONG_DOUBLE_TYPE_SIZE}. If you don't define this, the -default is @code{LONG_DOUBLE_TYPE_SIZE}. -@end defmac - @defmac LIBGCC2_GNU_PREFIX This macro corresponds to the @code{TARGET_LIBFUNC_GNU_PREFIX} target hook and should be defined if that hook is overriden to be true. It diff --git a/gcc/system.h b/gcc/system.h index 3208a9d6f8c5..dbe1ceb3d8ad 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -936,7 +936,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; EXTRA_CONSTRAINT_STR EXTRA_MEMORY_CONSTRAINT \ EXTRA_ADDRESS_CONSTRAINT CONST_DOUBLE_OK_FOR_CONSTRAINT_P \ CALLER_SAVE_PROFITABLE LARGEST_EXPONENT_IS_NORMAL \ - ROUND_TOWARDS_ZERO SF_SIZE DF_SIZE XF_SIZE TF_SIZE LIBGCC2_TF_CEXT + ROUND_TOWARDS_ZERO SF_SIZE DF_SIZE XF_SIZE TF_SIZE LIBGCC2_TF_CEXT \ + LIBGCC2_LONG_DOUBLE_TYPE_SIZE /* Hooks that are no longer used. */ #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \ diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 9eb57755b8fa..b43307062e8e 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,16 @@ +2014-09-22 Joseph Myers + + * dfp-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + (__LIBGCC_XF_MANT_DIG__): Define if not already defined. + (LONG_DOUBLE_HAS_XF_MODE): Define in terms of + __LIBGCC_XF_MANT_DIG__. + (__LIBGCC_TF_MANT_DIG__): Define if not already defined. + (LONG_DOUBLE_HAS_TF_MODE): Define in terms of + __LIBGCC_TF_MANT_DIG__. + * libgcc2.c (NOTRUNC): Define in terms of + __LIBGCC_*_EXCESS_PRECISION__, not LIBGCC2_LONG_DOUBLE_TYPE_SIZE. + * libgcc2.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove. + 2014-09-22 Joseph Myers PR target/63312 diff --git a/libgcc/dfp-bit.h b/libgcc/dfp-bit.h index 89dbd8fe89fb..7a90a7298e55 100644 --- a/libgcc/dfp-bit.h +++ b/libgcc/dfp-bit.h @@ -34,19 +34,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "tm.h" #include "libgcc_tm.h" -#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE -#endif - /* We need to know the size of long double that the C library supports. Don't use LIBGCC2_HAS_XF_MODE or LIBGCC2_HAS_TF_MODE here because some targets set both of those. */ +#ifndef __LIBGCC_XF_MANT_DIG__ +#define __LIBGCC_XF_MANT_DIG__ 0 +#endif #define LONG_DOUBLE_HAS_XF_MODE \ - (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80) + (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__) +#ifndef __LIBGCC_TF_MANT_DIG__ +#define __LIBGCC_TF_MANT_DIG__ 0 +#endif #define LONG_DOUBLE_HAS_TF_MODE \ - (BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128) + (__LDBL_MANT_DIG__ == __LIBGCC_TF_MANT_DIG__) /* Depending on WIDTH, define a number of macros: diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index dc8a235e8b88..46d6a2ef030f 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -1866,29 +1866,25 @@ NAME (TYPE x, int m) # define CTYPE SCtype # define MODE sc # define CEXT __LIBGCC_SF_FUNC_EXT__ -# define NOTRUNC __FLT_EVAL_METHOD__ == 0 +# define NOTRUNC __LIBGCC_SF_EXCESS_PRECISION__ #elif defined(L_muldc3) || defined(L_divdc3) # define MTYPE DFtype # define CTYPE DCtype # define MODE dc # define CEXT __LIBGCC_DF_FUNC_EXT__ -# if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64 -# define NOTRUNC 1 -# else -# define NOTRUNC __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 1 -# endif +# define NOTRUNC __LIBGCC_DF_EXCESS_PRECISION__ #elif defined(L_mulxc3) || defined(L_divxc3) # define MTYPE XFtype # define CTYPE XCtype # define MODE xc # define CEXT __LIBGCC_XF_FUNC_EXT__ -# define NOTRUNC 1 +# define NOTRUNC __LIBGCC_XF_EXCESS_PRECISION__ #elif defined(L_multc3) || defined(L_divtc3) # define MTYPE TFtype # define CTYPE TCtype # define MODE tc # define CEXT __LIBGCC_TF_FUNC_EXT__ -# define NOTRUNC 1 +# define NOTRUNC __LIBGCC_TF_EXCESS_PRECISION__ #else # error #endif diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index 597b0ac1de7e..c9ddce2876b2 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -34,10 +34,6 @@ extern void __clear_cache (char *, char *); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); -#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE -#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE -#endif - #ifdef __LIBGCC_HAS_SF_MODE__ #define LIBGCC2_HAS_SF_MODE 1 #else