builtins.def: Rename BUILT_IN_FSQRT to BUILT_IN_SQRT and __builtin_fsqrt to __builtin_sqrt.

2001-12-14  Roger Sayle <roger@eyesopen.com>

	* builtins.def: Rename BUILT_IN_FSQRT to BUILT_IN_SQRT and
	__builtin_fsqrt to __builtin_sqrt.
	* builtins.c (expand_builtin_mathfn,expand_builtin): Same.
	* doc/extend.texi: Simplify documentation to match patch.
f:
	* com-rt.def: Use __builtin_sqrt instead of __builtin_fsqrt.
	* com.c (ffecom_init_0): Same, and fixed enumeration usage.
libstdc++-v3:
	* acconfig.h: Test for __builtin_sqrt instead of
	__builtin_fsqrt.
	* acinclude.m4: Same.
	* include/c_shadow/bits/std_cmath.h: Same.
	* aclocal.m4: Regenerated.
	* config.h.in: Regenerated.
	* configure: Regenerated.

From-SVN: r48008
This commit is contained in:
Andreas Jaeger 2001-12-14 22:06:35 +01:00
parent e10e23ee51
commit dc6f415864
14 changed files with 255 additions and 234 deletions

View File

@ -1,3 +1,11 @@
2001-12-14 Roger Sayle <roger@eyesopen.com>
* builtins.def: Rename BUILT_IN_FSQRT to BUILT_IN_SQRT and
__builtin_fsqrt to __builtin_sqrt.
* builtins.c (expand_builtin_mathfn,expand_builtin): Same.
* doc/extend.texi: Simplify documentation to match patch.
Fri Dec 14 21:23:54 CET 2001 Jan Hubicka <jh@suse.cz>
* config.gcc: Revamp target_cpu_default2 to strings;
@ -137,7 +145,7 @@ Thu Dec 13 20:30:08 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* collect2.c (COLLECT_SHARED_INIT_FUNC)
(COLLECT_SHARD_FINI_FUNC): Define default values.
(write_c_file_stat): Use them to call construtor and destructor
(write_c_file_stat): Use them to call construtor and destructor
functions in shared libraries.
* doc/tm.texi (COLLECT_SHARED_INIT_FUNC)
(COLLECT_SHARD_FINI_FUNC): Document them.

View File

@ -1506,7 +1506,7 @@ expand_builtin_mathfn (exp, target, subtarget)
case BUILT_IN_COSF:
case BUILT_IN_COSL:
builtin_optab = cos_optab; break;
case BUILT_IN_FSQRT:
case BUILT_IN_SQRT:
case BUILT_IN_SQRTF:
case BUILT_IN_SQRTL:
builtin_optab = sqrt_optab; break;
@ -3550,7 +3550,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
{
case BUILT_IN_SIN:
case BUILT_IN_COS:
case BUILT_IN_FSQRT:
case BUILT_IN_SQRT:
case BUILT_IN_SQRTF:
case BUILT_IN_SQRTL:
case BUILT_IN_MEMSET:
@ -3621,7 +3621,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
because of possible accuracy problems. */
if (! flag_unsafe_math_optimizations)
break;
case BUILT_IN_FSQRT:
case BUILT_IN_SQRT:
case BUILT_IN_SQRTF:
case BUILT_IN_SQRTL:
target = expand_builtin_mathfn (exp, target, subtarget);

View File

@ -263,8 +263,8 @@ DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
"__builtin_strrchr",
BT_FN_STRING_CONST_STRING_INT)
DEF_LIB_BUILTIN(BUILT_IN_FSQRT,
"__builtin_fsqrt",
DEF_LIB_BUILTIN(BUILT_IN_SQRT,
"__builtin_sqrt",
BT_FN_DOUBLE_DOUBLE)
DEF_LIB_BUILTIN(BUILT_IN_SIN,
"__builtin_sin",

View File

@ -4400,10 +4400,8 @@ The ISO C89 functions @code{abs}, @code{cos}, @code{fabs},
@code{strpbrk}, @code{strrchr}, @code{strspn}, and @code{strstr} are all
recognized as built-in functions unless @option{-fno-builtin} is
specified (or @option{-fno-builtin-@var{function}} is specified for an
individual function). All of these functions have
corresponding versions prefixed
with @code{__builtin_}, except that the version for @code{sqrt} is
called @code{__builtin_fsqrt}.
individual function). All of these functions have corresponding
versions prefixed with @code{__builtin_}.
GCC provides built-in versions of the ISO C99 floating point comparison
macros that avoid raising exceptions for unordered operands. They have

View File

@ -1,3 +1,8 @@
2001-12-14 Roger Sayle <roger@eyesopen.com>
* com-rt.def: Use __builtin_sqrt instead of __builtin_fsqrt.
* com.c (ffecom_init_0): Same, and fixed enumeration usage.
2001-12-10 Joseph S. Myers <jsm28@cam.ac.uk>
* g77.texi: Don't condition menus on @ifinfo.
@ -953,7 +958,7 @@ Sun Jun 11 00:03:00 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
* top.c (ffe_decode_option): Update -Wall unused flags by calling
set_Wunused.
set_Wunused.
2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
@ -1270,7 +1275,7 @@ Sun Sep 12 23:29:47 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
(g77_newargv): Constify.
(lookup_option, append_arg, lang_specific_driver): Constify a char*.
(lang_specific_driver): All calls to the function pointer
parameter now explicitly call `fatal'.
parameter now explicitly call `fatal'.
Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>

View File

@ -273,7 +273,7 @@ DEFGFRT (FFECOM_gfrtL_LOG10, "log10", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, T
DEFGFRT (FFECOM_gfrtL_POW, "pow", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_SIN, "__builtin_sin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_SINH, "sinh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_fsqrt", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_sqrt", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_TAN, "tan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)
DEFGFRT (FFECOM_gfrtL_TANH, "tanh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE)

View File

@ -11713,23 +11713,23 @@ ffecom_init_0 ()
= build_function_type (void_type_node, NULL_TREE);
builtin_function ("__builtin_sqrtf", float_ftype_float,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, "sqrtf");
builtin_function ("__builtin_fsqrt", double_ftype_double,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, "sqrt");
BUILT_IN_SQRTF, BUILT_IN_NORMAL, "sqrtf");
builtin_function ("__builtin_sqrt", double_ftype_double,
BUILT_IN_SQRT, BUILT_IN_NORMAL, "sqrt");
builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, "sqrtl");
BUILT_IN_SQRTL, BUILT_IN_NORMAL, "sqrtl");
builtin_function ("__builtin_sinf", float_ftype_float,
BUILT_IN_SIN, BUILT_IN_NORMAL, "sinf");
BUILT_IN_SINF, BUILT_IN_NORMAL, "sinf");
builtin_function ("__builtin_sin", double_ftype_double,
BUILT_IN_SIN, BUILT_IN_NORMAL, "sin");
builtin_function ("__builtin_sinl", ldouble_ftype_ldouble,
BUILT_IN_SIN, BUILT_IN_NORMAL, "sinl");
BUILT_IN_SINL, BUILT_IN_NORMAL, "sinl");
builtin_function ("__builtin_cosf", float_ftype_float,
BUILT_IN_COS, BUILT_IN_NORMAL, "cosf");
BUILT_IN_COSF, BUILT_IN_NORMAL, "cosf");
builtin_function ("__builtin_cos", double_ftype_double,
BUILT_IN_COS, BUILT_IN_NORMAL, "cos");
builtin_function ("__builtin_cosl", ldouble_ftype_ldouble,
BUILT_IN_COS, BUILT_IN_NORMAL, "cosl");
BUILT_IN_COSL, BUILT_IN_NORMAL, "cosl");
pedantic_lvalues = FALSE;

File diff suppressed because it is too large Load Diff

View File

@ -100,8 +100,8 @@
// Define if the compiler/host combination has __builtin_sinl
#undef HAVE___BUILTIN_SINL
// Define if the compiler/host combination has __builtin_fsqrt
#undef HAVE___BUILTIN_FSQRT
// Define if the compiler/host combination has __builtin_sqrt
#undef HAVE___BUILTIN_SQRT
// Define if the compiler/host combination has __builtin_sqrtf
#undef HAVE___BUILTIN_SQRTF

View File

@ -587,7 +587,7 @@ dnl check for __builtin_fabl
dnl check for __builtin_labs
dnl check for __builtin_sqrtf
dnl check for __builtin_sqrtl
dnl check for __builtin_fsqrt
dnl check for __builtin_sqrt
dnl check for __builtin_sinf
dnl check for __builtin_sin
dnl check for __builtin_sinl
@ -606,7 +606,7 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fsqrt)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
@ -636,7 +636,7 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
AC_DEFINE(HAVE___BUILTIN_SIN)
AC_DEFINE(HAVE___BUILTIN_SINF)
AC_DEFINE(HAVE___BUILTIN_SINL)
AC_DEFINE(HAVE___BUILTIN_FSQRT)
AC_DEFINE(HAVE___BUILTIN_SQRT)
AC_DEFINE(HAVE___BUILTIN_SQRTF)
AC_DEFINE(HAVE___BUILTIN_SQRTL)
fi

View File

@ -599,7 +599,7 @@ dnl check for __builtin_fabl
dnl check for __builtin_labs
dnl check for __builtin_sqrtf
dnl check for __builtin_sqrtl
dnl check for __builtin_fsqrt
dnl check for __builtin_sqrt
dnl check for __builtin_sinf
dnl check for __builtin_sin
dnl check for __builtin_sinl
@ -618,7 +618,7 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fsqrt)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
@ -648,7 +648,7 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
AC_DEFINE(HAVE___BUILTIN_SIN)
AC_DEFINE(HAVE___BUILTIN_SINF)
AC_DEFINE(HAVE___BUILTIN_SINL)
AC_DEFINE(HAVE___BUILTIN_FSQRT)
AC_DEFINE(HAVE___BUILTIN_SQRT)
AC_DEFINE(HAVE___BUILTIN_SQRTF)
AC_DEFINE(HAVE___BUILTIN_SQRTL)
fi

View File

@ -81,8 +81,8 @@
// Define if the compiler/host combination has __builtin_sinl
#undef HAVE___BUILTIN_SINL
// Define if the compiler/host combination has __builtin_fsqrt
#undef HAVE___BUILTIN_FSQRT
// Define if the compiler/host combination has __builtin_sqrt
#undef HAVE___BUILTIN_SQRT
// Define if the compiler/host combination has __builtin_sqrtf
#undef HAVE___BUILTIN_SQRTF

View File

@ -6502,10 +6502,10 @@ EOF
fi
echo $ac_n "checking for __builtin_fsqrt declaration""... $ac_c" 1>&6
echo "configure:6507: checking for __builtin_fsqrt declaration" >&5
if test x${glibcpp_cv_func___builtin_fsqrt_use+set} != xset; then
if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fsqrt_use'+set}'`\" = set"; then
echo $ac_n "checking for __builtin_sqrt declaration""... $ac_c" 1>&6
echo "configure:6507: checking for __builtin_sqrt declaration" >&5
if test x${glibcpp_cv_func___builtin_sqrt_use+set} != xset; then
if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_use'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -6522,17 +6522,17 @@ cross_compiling=$ac_cv_prog_cxx_cross
#include "confdefs.h"
#include <math.h>
int main() {
__builtin_fsqrt(0);
__builtin_sqrt(0);
; return 0; }
EOF
if { (eval echo configure:6529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_func___builtin_fsqrt_use=yes
glibcpp_cv_func___builtin_sqrt_use=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
glibcpp_cv_func___builtin_fsqrt_use=no
glibcpp_cv_func___builtin_sqrt_use=no
fi
rm -f conftest*
ac_ext=c
@ -6546,12 +6546,12 @@ cross_compiling=$ac_cv_prog_cc_cross
fi
fi
echo "$ac_t""$glibcpp_cv_func___builtin_fsqrt_use" 1>&6
if test x$glibcpp_cv_func___builtin_fsqrt_use = x"yes"; then
echo $ac_n "checking for __builtin_fsqrt linkage""... $ac_c" 1>&6
echo "configure:6553: checking for __builtin_fsqrt linkage" >&5
if test x${glibcpp_cv_func___builtin_fsqrt_link+set} != xset; then
if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fsqrt_link'+set}'`\" = set"; then
echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_use" 1>&6
if test x$glibcpp_cv_func___builtin_sqrt_use = x"yes"; then
echo $ac_n "checking for __builtin_sqrt linkage""... $ac_c" 1>&6
echo "configure:6553: checking for __builtin_sqrt linkage" >&5
if test x${glibcpp_cv_func___builtin_sqrt_link+set} != xset; then
if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_link'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -6560,26 +6560,26 @@ else
#include "confdefs.h"
#include <math.h>
int main() {
__builtin_fsqrt(0);
__builtin_sqrt(0);
; return 0; }
EOF
if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
glibcpp_cv_func___builtin_fsqrt_link=yes
glibcpp_cv_func___builtin_sqrt_link=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
glibcpp_cv_func___builtin_fsqrt_link=no
glibcpp_cv_func___builtin_sqrt_link=no
fi
rm -f conftest*
fi
fi
echo "$ac_t""$glibcpp_cv_func___builtin_fsqrt_link" 1>&6
if test x$glibcpp_cv_func___builtin_fsqrt_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_fsqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_link" 1>&6
if test x$glibcpp_cv_func___builtin_sqrt_link = x"yes"; then
ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define ${ac_tr_func} 1
EOF
@ -7239,7 +7239,7 @@ EOF
EOF
cat >> confdefs.h <<\EOF
#define HAVE___BUILTIN_FSQRT 1
#define HAVE___BUILTIN_SQRT 1
EOF
cat >> confdefs.h <<\EOF

View File

@ -318,7 +318,7 @@ namespace _C_legacy {
#if _GLIBCPP_HAVE___BUILTIN_SQRT
inline double
_CPP_sqrt_capture(double __x) { return __builtin_fsqrt(__x); }
_CPP_sqrt_capture(double __x) { return __builtin_sqrt(__x); }
#else
inline double
_CPP_sqrt_capture(double __x) { return sqrt(__x); }