]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tm.texi (TARGET_HAS_SINCOS): Document new target macro.
authorRichard Guenther <rguenther@suse.de>
Fri, 19 Jan 2007 11:06:56 +0000 (11:06 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 19 Jan 2007 11:06:56 +0000 (11:06 +0000)
2007-01-19  Richard Guenther  <rguenther@suse.de>

* 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

gcc/ChangeLog
gcc/config/alpha/linux.h
gcc/config/linux.h
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h
gcc/defaults.h
gcc/doc/tm.texi

index 1843e84d23912384405de1d289a25ba39c78395c..bd50a12f93ffc01e3842e9092c624bbc14f77af1 100644 (file)
@@ -1,3 +1,14 @@
+2007-01-19  Richard Guenther  <rguenther@suse.de>
+
+       * 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  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*fpatanxf3_i387, fpatan_extend<mode>xf3_i387):
index dcd3c6597c4382f1bc1885b875b496dc4fc3b12b..a496f40aa5e0fea9a73e479280500010a847a0b9 100644 (file)
@@ -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 \
index 59e3e8538f9c02ebe5823df168b118dfdebf11d8..0907837434075f12869ac0700902be2a45659964 100644 (file)
@@ -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
index 3df356fca1aaf3908524046dba09568321f170c0..c6a6fda00689f809949e7cb22cb1ceb990e602b6 100644 (file)
 #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                                           \
index 5c62a1d133be183d34feff800ff7896d43caaf32..5b954a9535d297d339d2cf254adfae134ba13299 100644 (file)
@@ -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                                                   \
index 5af67a6a34d9b49b308c38423119f4d48df2153f..7c50d3c6139ce2f0cd82cbd9fea5ac3ba7203982 100644 (file)
@@ -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
index b0ddf4b3d3bea980d3006360d92b080ad4e99687..60bda622cc7b48355f86253f7bb4dd31bea6f7fa 100644 (file)
@@ -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
index 6af5f17bd7dd75e6362837a34d1a44deea311156..b17d59e19403df5a7238db536784ea9e57ae2eda 100644 (file)
@@ -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
index ad707798a8f9ec46857f1017ae6256ddbba9a78a..33905757a50c0965c4342a2fb6c20339a0016f70 100644 (file)
@@ -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