mirror of git://gcc.gnu.org/git/gcc.git
stubs.c (sinf,cosf): Implement stubs to enable the equivalent ___builtin__ versions.
2002-01-01 Roger Sayle <roger@eyesopen.com> * libmath/stubs.c (sinf,cosf): Implement stubs to enable the equivalent ___builtin__ versions. * include/c_shadow/bits/std_cmath.h: All __builtin math functions are available in libstdc++ as the necessary stub implementations are provided by libmath/stubs.c. From-SVN: r48445
This commit is contained in:
parent
240bb1c62c
commit
709f271858
|
|
@ -1,3 +1,12 @@
|
||||||
|
2002-01-01 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* libmath/stubs.c (sinf,cosf): Implement stubs to enable the
|
||||||
|
equivalent ___builtin__ versions.
|
||||||
|
|
||||||
|
* include/c_shadow/bits/std_cmath.h: All __builtin math functions
|
||||||
|
are available in libstdc++ as the necessary stub implementations
|
||||||
|
are provided by libmath/stubs.c.
|
||||||
|
|
||||||
2002-01-01 Jason Thorpe <thorpej@wasabisystems.com>
|
2002-01-01 Jason Thorpe <thorpej@wasabisystems.com>
|
||||||
|
|
||||||
* configure.in: Add support for NetBSD cross compiles.
|
* configure.in: Add support for NetBSD cross compiles.
|
||||||
|
|
@ -55,7 +64,7 @@
|
||||||
|
|
||||||
* include/backward/algo.h: Include <ext/algorithm>,
|
* include/backward/algo.h: Include <ext/algorithm>,
|
||||||
tweak using declarations.
|
tweak using declarations.
|
||||||
|
|
||||||
2001-12-29 Richard Henderson <rth@redhat.com>
|
2001-12-29 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* config/os/hpux/bits/os_defines.h: Don't define __glibcpp_long_bits.
|
* config/os/hpux/bits/os_defines.h: Don't define __glibcpp_long_bits.
|
||||||
|
|
@ -132,7 +141,7 @@
|
||||||
(back_insert_iterator): Uglify member container to _M_container.
|
(back_insert_iterator): Uglify member container to _M_container.
|
||||||
(front_insert_iterator): Same.
|
(front_insert_iterator): Same.
|
||||||
(insert_iterator): Same.
|
(insert_iterator): Same.
|
||||||
|
|
||||||
2001-12-25 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
|
2001-12-25 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
|
||||||
|
|
||||||
* include/bits/std_limits.h (__glibcpp_xxx_is_modulo): New
|
* include/bits/std_limits.h (__glibcpp_xxx_is_modulo): New
|
||||||
|
|
@ -156,7 +165,7 @@
|
||||||
for strtoll and strtoull.
|
for strtoll and strtoull.
|
||||||
|
|
||||||
2001-12-21 Jeffrey A Law <law@redhat.com>
|
2001-12-21 Jeffrey A Law <law@redhat.com>
|
||||||
|
|
||||||
* config/os/hpux/bits/os_defines.h: Include <sys/_inttypes.h.
|
* config/os/hpux/bits/os_defines.h: Include <sys/_inttypes.h.
|
||||||
Define strtoll and strtoull. Provide prototypes for
|
Define strtoll and strtoull. Provide prototypes for
|
||||||
__strtoll and __strtoull. Define _GLIBCPP_USE_LONG_LONG
|
__strtoll and __strtoull. Define _GLIBCPP_USE_LONG_LONG
|
||||||
|
|
@ -206,7 +215,7 @@
|
||||||
2001-12-19 David Billinghurst <David.Billinghurst@riotinto.com>
|
2001-12-19 David Billinghurst <David.Billinghurst@riotinto.com>
|
||||||
|
|
||||||
libstdc++-v3/5148
|
libstdc++-v3/5148
|
||||||
* testsuite/lib/libstdc++-v3-dg.exp: Append .exe to
|
* testsuite/lib/libstdc++-v3-dg.exp: Append .exe to
|
||||||
executable filenames
|
executable filenames
|
||||||
|
|
||||||
2001-12-18 Benjamin Kosnik <bkoz@redhat.com>
|
2001-12-18 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
@ -222,10 +231,10 @@
|
||||||
enabling gnu model.
|
enabling gnu model.
|
||||||
* aclocal.m4: Rebuild.
|
* aclocal.m4: Rebuild.
|
||||||
* configure: Rebuild.
|
* configure: Rebuild.
|
||||||
|
|
||||||
2001-12-18 Paolo Carlini <pcarlini@unitus.it>
|
2001-12-18 Paolo Carlini <pcarlini@unitus.it>
|
||||||
Nathan Myers <ncm@cantrip.org>
|
Nathan Myers <ncm@cantrip.org>
|
||||||
|
|
||||||
* include/bits/basic_string.h (assign(__str, __pos, __n)):
|
* include/bits/basic_string.h (assign(__str, __pos, __n)):
|
||||||
Call assign(__s, __n).
|
Call assign(__s, __n).
|
||||||
(assign(__s, __n)): Terminate the string with _S_terminal.
|
(assign(__s, __n)): Terminate the string with _S_terminal.
|
||||||
|
|
@ -275,7 +284,7 @@
|
||||||
on linux by default.
|
on linux by default.
|
||||||
* aclocal.m4: Regenerate.
|
* aclocal.m4: Regenerate.
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
||||||
2001-12-14 Benjamin Kosnik <bkoz@redhat.com>
|
2001-12-14 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
Clean up initialization and simplfy caching of underlying "C"
|
Clean up initialization and simplfy caching of underlying "C"
|
||||||
|
|
@ -297,11 +306,11 @@
|
||||||
* config/os/gnu-linux/bits/ctype_inline.h: Tweak.
|
* config/os/gnu-linux/bits/ctype_inline.h: Tweak.
|
||||||
* config/os/gnu-linux/bits/ctype_noninline.h: Adjust initializations.
|
* config/os/gnu-linux/bits/ctype_noninline.h: Adjust initializations.
|
||||||
* include/bits/locale_facets.h (ctype<char>::_M_c_locale_ctype): Add.
|
* include/bits/locale_facets.h (ctype<char>::_M_c_locale_ctype): Add.
|
||||||
Adjust ctors, dtors.
|
Adjust ctors, dtors.
|
||||||
(ctype<char>::_M_toupper): Remove const&.
|
(ctype<char>::_M_toupper): Remove const&.
|
||||||
(ctype<char>::_M_tolower): Remove const&.
|
(ctype<char>::_M_tolower): Remove const&.
|
||||||
(ctype<char>::_M_ctable): Remove const&.
|
(ctype<char>::_M_ctable): Remove const&.
|
||||||
|
|
||||||
* include/bits/locale_facets.h (collate): Clean up initialization
|
* include/bits/locale_facets.h (collate): Clean up initialization
|
||||||
of _M_c_locale_collate in ctors and dtors.
|
of _M_c_locale_collate in ctors and dtors.
|
||||||
* config/locale/collate_members_gnu.cc: Always use extended
|
* config/locale/collate_members_gnu.cc: Always use extended
|
||||||
|
|
@ -316,7 +325,7 @@
|
||||||
* include/bits/localefwd.h: Clean. Move dtor definitions to
|
* include/bits/localefwd.h: Clean. Move dtor definitions to
|
||||||
* src/locale.cc: Here.
|
* src/locale.cc: Here.
|
||||||
* testsuite/22_locale/facet.cc: Fix spelling.
|
* testsuite/22_locale/facet.cc: Fix spelling.
|
||||||
|
|
||||||
Named locale support for ctype<wchar_t>.
|
Named locale support for ctype<wchar_t>.
|
||||||
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add variable
|
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add variable
|
||||||
ctype_members_* bits.
|
ctype_members_* bits.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- C++ -*- header wrapper.
|
// -*- C++ -*- header wrapper.
|
||||||
|
|
||||||
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
|
// Copyright (C) 1997-1999, 2000, 2002 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
// software; you can redistribute it and/or modify it under the
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
|
@ -84,16 +84,8 @@ namespace _C_legacy {
|
||||||
_CPP_ceil_capture(float __x) { return ceil(static_cast<double>(__x)); }
|
_CPP_ceil_capture(float __x) { return ceil(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_COSF
|
|
||||||
inline float
|
inline float
|
||||||
_CPP_cos_capture(float __x) { return __builtin_cosf(__x); }
|
_CPP_cos_capture(float __x) { return __builtin_cosf(__x); }
|
||||||
#elif _GLIBCPP_HAVE_COSF
|
|
||||||
inline float
|
|
||||||
_CPP_cos_capture(float __x) { return cosf(__x); }
|
|
||||||
#else
|
|
||||||
inline float
|
|
||||||
_CPP_cos_capture(float __x) { return cos(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_COSHF
|
#if _GLIBCPP_HAVE_COSHF
|
||||||
inline float
|
inline float
|
||||||
|
|
@ -111,16 +103,8 @@ namespace _C_legacy {
|
||||||
_CPP_exp_capture(float __x) { return exp(static_cast<double>(__x)); }
|
_CPP_exp_capture(float __x) { return exp(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_FABSF
|
|
||||||
inline float
|
inline float
|
||||||
_CPP_fabs_capture(float __x) { return __builtin_fabsf(__x); }
|
_CPP_fabs_capture(float __x) { return __builtin_fabsf(__x); }
|
||||||
#elif _GLIBCPP_HAVE_FABSF
|
|
||||||
inline float
|
|
||||||
_CPP_fabs_capture(float __x) { return fabsf(__x); }
|
|
||||||
#else
|
|
||||||
inline float
|
|
||||||
_CPP_fabs_capture(float __x) { return fabs(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_FLOORF
|
#if _GLIBCPP_HAVE_FLOORF
|
||||||
inline float
|
inline float
|
||||||
|
|
@ -197,16 +181,8 @@ namespace _C_legacy {
|
||||||
|
|
||||||
float pow(float, int);
|
float pow(float, int);
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SINF
|
|
||||||
inline float
|
inline float
|
||||||
_CPP_sin_capture(float __x) { return __builtin_sinf(__x); }
|
_CPP_sin_capture(float __x) { return __builtin_sinf(__x); }
|
||||||
#elif _GLIBCPP_HAVE_SINF
|
|
||||||
inline float
|
|
||||||
_CPP_sin_capture(float __x) { return sinf(__x); }
|
|
||||||
#else
|
|
||||||
inline float
|
|
||||||
_CPP_sin_capture(float __x) { return sin(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_SINHF
|
#if _GLIBCPP_HAVE_SINHF
|
||||||
inline float
|
inline float
|
||||||
|
|
@ -216,16 +192,8 @@ namespace _C_legacy {
|
||||||
_CPP_sinh_capture(float __x) { return sinh(static_cast<double>(__x)); }
|
_CPP_sinh_capture(float __x) { return sinh(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SQRTF
|
|
||||||
inline float
|
inline float
|
||||||
_CPP_sqrt_capture(float __x) { return __builtin_sqrtf(__x); }
|
_CPP_sqrt_capture(float __x) { return __builtin_sqrtf(__x); }
|
||||||
#elif _GLIBCPP_HAVE_SQRTF
|
|
||||||
inline float
|
|
||||||
_CPP_sqrt_capture(float __x) { return sqrtf(__x); }
|
|
||||||
#else
|
|
||||||
inline float
|
|
||||||
_CPP_sqrt_capture(float __x) { return sqrt(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_TANF
|
#if _GLIBCPP_HAVE_TANF
|
||||||
inline float
|
inline float
|
||||||
|
|
@ -259,13 +227,8 @@ namespace _C_legacy {
|
||||||
inline double
|
inline double
|
||||||
_CPP_ceil_capture(double __x) { return ceil(__x); }
|
_CPP_ceil_capture(double __x) { return ceil(__x); }
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_COS
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_cos_capture(double __x) { return __builtin_cos(__x); }
|
_CPP_cos_capture(double __x) { return __builtin_cos(__x); }
|
||||||
#else
|
|
||||||
inline double
|
|
||||||
_CPP_cos_capture(double __x) { return cos(__x); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_cosh_capture(double __x) { return cosh(__x); }
|
_CPP_cosh_capture(double __x) { return cosh(__x); }
|
||||||
|
|
@ -273,13 +236,8 @@ namespace _C_legacy {
|
||||||
inline double
|
inline double
|
||||||
_CPP_exp_capture(double __x) { return exp(__x); }
|
_CPP_exp_capture(double __x) { return exp(__x); }
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_FABS
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_fabs_capture(double __x) { return __builtin_fabs(__x); }
|
_CPP_fabs_capture(double __x) { return __builtin_fabs(__x); }
|
||||||
#else
|
|
||||||
inline double
|
|
||||||
_CPP_fabs_capture(double __x) { return fabs(__x); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_floor_capture(double __x) { return floor(__x); }
|
_CPP_floor_capture(double __x) { return floor(__x); }
|
||||||
|
|
@ -305,24 +263,14 @@ namespace _C_legacy {
|
||||||
inline double
|
inline double
|
||||||
_CPP_pow_capture(double __x, double __y) { return pow(__x, __y); }
|
_CPP_pow_capture(double __x, double __y) { return pow(__x, __y); }
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SIN
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_sin_capture(double __x) { return __builtin_sin(__x); }
|
_CPP_sin_capture(double __x) { return __builtin_sin(__x); }
|
||||||
#else
|
|
||||||
inline double
|
|
||||||
_CPP_sin_capture(double __x) { return sin(__x); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_sinh_capture(double __x) { return sinh(__x); }
|
_CPP_sinh_capture(double __x) { return sinh(__x); }
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SQRT
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_sqrt_capture(double __x) { return __builtin_sqrt(__x); }
|
_CPP_sqrt_capture(double __x) { return __builtin_sqrt(__x); }
|
||||||
#else
|
|
||||||
inline double
|
|
||||||
_CPP_sqrt_capture(double __x) { return sqrt(__x); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline double
|
inline double
|
||||||
_CPP_tan_capture(double __x) { return tan(__x); }
|
_CPP_tan_capture(double __x) { return tan(__x); }
|
||||||
|
|
@ -372,16 +320,8 @@ namespace _C_legacy {
|
||||||
_CPP_ceil_capture(long double __x) { return ceil(static_cast<double>(__x)); }
|
_CPP_ceil_capture(long double __x) { return ceil(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_COSL
|
|
||||||
inline long double
|
inline long double
|
||||||
_CPP_cos_capture(long double __x) { return __builtin_cosl(__x); }
|
_CPP_cos_capture(long double __x) { return __builtin_cosl(__x); }
|
||||||
#elif _GLIBCPP_HAVE_COSL
|
|
||||||
inline long double
|
|
||||||
_CPP_cos_capture(long double __x) { return cosl(__x); }
|
|
||||||
#else
|
|
||||||
inline long double
|
|
||||||
_CPP_cos_capture(long double __x) { return cos(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_COSHL
|
#if _GLIBCPP_HAVE_COSHL
|
||||||
inline long double
|
inline long double
|
||||||
|
|
@ -399,16 +339,8 @@ namespace _C_legacy {
|
||||||
_CPP_exp_capture(long double __x) { return exp(static_cast<double>(__x)); }
|
_CPP_exp_capture(long double __x) { return exp(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_FABSL
|
|
||||||
inline long double
|
inline long double
|
||||||
_CPP_fabs_capture(long double __x) { return __builtin_fabsl(__x); }
|
_CPP_fabs_capture(long double __x) { return __builtin_fabsl(__x); }
|
||||||
#elif _GLIBCPP_HAVE_FABSL
|
|
||||||
inline long double
|
|
||||||
_CPP_fabs_capture(long double __x) { return fabsl(__x); }
|
|
||||||
#else
|
|
||||||
inline long double
|
|
||||||
_CPP_fabs_capture(long double __x) { return fabs(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_FLOORL
|
#if _GLIBCPP_HAVE_FLOORL
|
||||||
inline long double
|
inline long double
|
||||||
|
|
@ -489,16 +421,8 @@ namespace _C_legacy {
|
||||||
{ return pow(static_cast<double>(__x), static_cast<double>(__y)); }
|
{ return pow(static_cast<double>(__x), static_cast<double>(__y)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SINL
|
|
||||||
inline long double
|
inline long double
|
||||||
_CPP_sin_capture(long double __x) { return __builtin_sinl(__x); }
|
_CPP_sin_capture(long double __x) { return __builtin_sinl(__x); }
|
||||||
#elif _GLIBCPP_HAVE_SINL
|
|
||||||
inline long double
|
|
||||||
_CPP_sin_capture(long double __x) { return sinl(__x); }
|
|
||||||
#else
|
|
||||||
inline long double
|
|
||||||
_CPP_sin_capture(long double __x) { return sin(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_SINHL
|
#if _GLIBCPP_HAVE_SINHL
|
||||||
inline long double
|
inline long double
|
||||||
|
|
@ -508,16 +432,8 @@ namespace _C_legacy {
|
||||||
_CPP_sinh_capture(long double __x) { return sinh(static_cast<double>(__x)); }
|
_CPP_sinh_capture(long double __x) { return sinh(static_cast<double>(__x)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE___BUILTIN_SQRTL
|
|
||||||
inline long double
|
inline long double
|
||||||
_CPP_sqrt_capture(long double __x) { return __builtin_sqrtl(__x); }
|
_CPP_sqrt_capture(long double __x) { return __builtin_sqrtl(__x); }
|
||||||
#elif _GLIBCPP_HAVE_SQRTL
|
|
||||||
inline long double
|
|
||||||
_CPP_sqrt_capture(long double __x) { return sqrtl(__x); }
|
|
||||||
#else
|
|
||||||
inline long double
|
|
||||||
_CPP_sqrt_capture(long double __x) { return sqrt(static_cast<double>(__x)); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _GLIBCPP_HAVE_TANL
|
#if _GLIBCPP_HAVE_TANL
|
||||||
inline long double
|
inline long double
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* Stub definitions for libmath subpart of libstdc++. */
|
/* Stub definitions for libmath subpart of libstdc++. */
|
||||||
|
|
||||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of the GNU ISO C++ Library. This library is free
|
This file is part of the GNU ISO C++ Library. This library is free
|
||||||
software; you can redistribute it and/or modify it under the
|
software; you can redistribute it and/or modify it under the
|
||||||
|
|
@ -51,7 +51,7 @@ atan2l(long double x, long double y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined(HAVE_COSF) && !defined(HAVE___BUILTIN_COSF)
|
#ifndef HAVE_COSF
|
||||||
float
|
float
|
||||||
cosf(float x)
|
cosf(float x)
|
||||||
{
|
{
|
||||||
|
|
@ -186,7 +186,7 @@ powl(long double x, long double y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined(HAVE_SINF) && !defined(HAVE___BUILTIN_SINF)
|
#ifndef HAVE_SINF
|
||||||
float
|
float
|
||||||
sinf(float x)
|
sinf(float x)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue