From: Richard Guenther Date: Fri, 19 Jan 2007 11:06:56 +0000 (+0000) Subject: tm.texi (TARGET_HAS_SINCOS): Document new target macro. X-Git-Tag: releases/gcc-4.3.0~7386 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=006339cde4079778a003f75127e5bc7fbcde256d;p=thirdparty%2Fgcc.git tm.texi (TARGET_HAS_SINCOS): Document new target macro. 2007-01-19 Richard Guenther * doc/tm.texi (TARGET_HAS_SINCOS): Document new target macro. * defaults.h (TARGET_HAS_SINCOS): Default to off. * config/linux.h (TARGET_HAS_SINCOS): Set to on if we have glibc. * config/alpha/linux.h (TARGET_HAS_SINCOS): Likewise. * config/sparc/linux.h (TARGET_HAS_SINCOS): Likewise. * config/sparc/linux64.h (TARGET_HAS_SINCOS): Likewise. * config/rs6000/linux.h (TARGET_HAS_SINCOS): Likewise. * config/rs6000/linux64.h (TARGET_HAS_SINCOS): Likewise. From-SVN: r120952 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1843e84d2391..bd50a12f93ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2007-01-19 Richard Guenther + + * doc/tm.texi (TARGET_HAS_SINCOS): Document new target macro. + * defaults.h (TARGET_HAS_SINCOS): Default to off. + * config/linux.h (TARGET_HAS_SINCOS): Set to on if we have glibc. + * config/alpha/linux.h (TARGET_HAS_SINCOS): Likewise. + * config/sparc/linux.h (TARGET_HAS_SINCOS): Likewise. + * config/sparc/linux64.h (TARGET_HAS_SINCOS): Likewise. + * config/rs6000/linux.h (TARGET_HAS_SINCOS): Likewise. + * config/rs6000/linux64.h (TARGET_HAS_SINCOS): Likewise. + 2007-01-19 Uros Bizjak * config/i386/i386.md (*fpatanxf3_i387, fpatan_extendxf3_i387): diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index dcd3c6597c43..a496f40aa5e0 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -66,6 +66,9 @@ Boston, MA 02110-1301, USA. */ runtime library. */ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #define TARGET_POSIX_IO #define LINK_GCC_C_SEQUENCE_SPEC \ diff --git a/gcc/config/linux.h b/gcc/config/linux.h index 59e3e8538f9c..090783743407 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -126,4 +126,7 @@ Boston, MA 02110-1301, USA. */ is present in the runtime library. */ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #define TARGET_POSIX_IO diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h index 3df356fca1aa..c6a6fda00689 100644 --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h @@ -35,6 +35,10 @@ #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#undef TARGET_HAS_SINCOS +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 5c62a1d133be..5b954a9535d2 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -285,6 +285,10 @@ extern int dot_symbols; #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#undef TARGET_HAS_SINCOS +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() \ do \ diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 5af67a6a34d9..7c50d3c6139c 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -215,6 +215,9 @@ do { \ runtime library. */ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #define TARGET_POSIX_IO #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index b0ddf4b3d3be..60bda622cc7b 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -347,6 +347,9 @@ do { \ runtime library. */ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) +/* Whether we have sincos that follows the GNU extension. */ +#define TARGET_HAS_SINCOS (OPTION_GLIBC) + #define TARGET_POSIX_IO #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/defaults.h b/gcc/defaults.h index 6af5f17bd7dd..b17d59e19403 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -796,6 +796,12 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #define TARGET_C99_FUNCTIONS 0 #endif +/* Determine whether the target runtime library has + a sincos implementation following the GNU extension. */ +#ifndef TARGET_HAS_SINCOS +#define TARGET_HAS_SINCOS 0 +#endif + /* Indicate that CLZ and CTZ are undefined at zero. */ #ifndef CLZ_DEFINED_VALUE_AT_ZERO #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index ad707798a8f9..33905757a50c 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5061,6 +5061,18 @@ number of existing systems lacks support for these functions in the runtime so they needs this macro to be redefined to 0. @end defmac +@cindex sincos math function, implicit usage +@defmac TARGET_HAS_SINCOS +When this macro is nonzero, GCC will implicitly optimize calls to @code{sin} +and @code{cos} with the same argument to a call to @code{sincos}. The +default is zero. The target has to provide the following functions: +@smallexample +void sincos(double x, double *sin, double *cos); +void sincosf(float x, float *sin, float *cos); +void sincosl(long double x, long double *sin, long double *cos); +@end smallexample +@end defmac + @defmac NEXT_OBJC_RUNTIME Define this macro to generate code for Objective-C message sending using the calling convention of the NeXT system. This calling convention