+2006-02-28 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/26055
+ Revert
+ * configure.ac: Disable libgcc-math if we cannot mix
+ declaration of __isinf and math.h inclusion.
+ * configure: Re-generate.
+
+ * i386/Makefile.am: Use -std=c99, do not use -ffinite-math-only,
+ do not define __NO_MATH_INLINES.
+ * i386/Makefile.in: Re-generate.
+ * include/math_private.h (__atanf): Declare.
+ (__scalbnf): Likewise.
+ (__floorf): Likewise.
+ (__isinff): Likewise.
+ (__scalbn): Likewise.
+ (__floor): Likewise.
+ (fabs): Likewise.
+ (fabsf): Likewise.
+ * flt-32/e_acosf.c: Do not include math.h
+ * flt-32/s_isinff.c: Likewise.
+ * flt-32/k_tanf.c: Likewise.
+ * flt-32/e_sqrtf.c: Likewise.
+ * flt-32/e_asinf.c: Likewise.
+ * flt-32/k_cosf.c: Likewise.
+ * flt-32/k_sinf.c: Likewise.
+ * flt-32/s_floorf.c: Likewise.
+ * flt-32/s_tanf.c: Likewise.
+ * flt-32/s_atanf.c: Likewise.
+ * flt-32/s_cosf.c: Likewise.
+ * flt-32/e_atan2f.c: Likewise.
+ * flt-32/e_powf.c: Likewise.
+ * flt-32/s_sinf.c: Likewise.
+ * flt-32/e_rem_pio2f.c: Likewise.
+ * flt-32/s_scalbnf.c: Likewise.
+ * flt-32/e_logf.c: Likewise.
+ * flt-32/e_log10f.c: Likewise.
+ * flt-32/k_rem_pio2f.c: Likewise.
+ * flt-32/e_expf.c: Likewise. Use __builtin_isless and
+ __builtin_isgreater.
+ * dbl-64/s_floor.c: Do not include math.h.
+ * dbl-64/e_log10.c: Likewise.
+ * dbl-64/k_rem_pio2.c: Likewise.
+ * dbl-64/s_atan.c: Likewise.
+ * dbl-64/s_scalbn.c: Likewise.
+ * dbl-64/s_isinf.c: Likewise.
+ * dbl-64/s_tan.c: Likewise.
+ * dbl-64/e_rem_pio2.c: Likewise. Avoid uninitialized variable
+ warning.
+ * dbl-64/mpa.c: Likewise.
+
2006-02-08 Richard Guenther <rguenther@suse.de>
* dbl-64/mpa.c: Do not include sys/param.h.
-# Check for target library dependencies
-cannot_build=no
-
-echo "$as_me:$LINENO: checking whether math.h conflicts with defining __isinf" >&5
-echo $ECHO_N "checking whether math.h conflicts with defining __isinf... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include "math.h"
-int __isinf (double x)
-{
-}
-
-int
-main ()
-{
-
-return __isinf (1.0);
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cannot_build=yes
-
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-
# Now check which parts we include in the library.
arch_subdirs=
-if test "$cannot_build" = "yes"; then
- arch_subdirs=
-fi
if test "x$arch_subdirs" != x; then
GCC_HEADER_STDINT(gstdint.h)
-# Check for target library dependencies
-cannot_build=no
-
-AC_MSG_CHECKING([whether math.h conflicts with defining __isinf])
-AC_TRY_LINK([
-#include "math.h"
-int __isinf (double x)
-{
-}
-], [
-return __isinf (1.0);
-], [
-AC_MSG_RESULT([no])
-], [
-AC_MSG_RESULT([yes])
-cannot_build=yes
-])
-
-
# Now check which parts we include in the library.
arch_subdirs=
AC_SUBST(arch_subdirs)
AC_SUBST(arch_libraries)
AC_SUBST(arch_maps)
-if test "$cannot_build" = "yes"; then
- arch_subdirs=
-fi
AM_CONDITIONAL(BUILD_LIBGCC_MATH, [test "x$arch_subdirs" != x])
* shown.
*/
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
* use __kernel_rem_pio2()
*/
-#include "math.h"
#include "math_private.h"
/*
double x,y[];
#endif
{
- double z,w,t,r,fn;
+ double z=z,w,t,r,fn;
double tx[3];
int32_t e0,i,j,nx,n,ix,hx;
uint32_t low;
* to produce the hexadecimal values shown.
*/
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
#if 0
int k;
#endif
- double a,c,u,v,z[5];
+ double a,c=c,u,v,z[5];
if (p<5) {
if (p==1) c = X[1];
else if (p==2) c = X[1] + R* X[2];
#include "MathLib.h"
#include "uatan.tbl"
#include "atnat.h"
-#include "math.h"
void __mpatan(mp_no *,mp_no *,int); /* see definition in mpatan.c */
static double atanMp(double,const int[]);
* Inexact flag raised if x not equal to floor(x).
*/
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
* no branching!
*/
-#include "math.h"
#include "math_private.h"
int
* exponentiation or a multiplication.
*/
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
-#include "math.h"
static double tanMp(double);
void __mptan(double, mp_no *, int);
static char rcsid[] = "$NetBSD: e_acosf.c,v 1.5 1995/05/12 04:57:16 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: e_atan2f.c,v 1.4 1995/05/10 20:44:53 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
#endif
#include <float.h>
#include <ieee754.h>
-#include <math.h>
#include <math_private.h>
extern const float __exp_deltatable[178];
static const float himark = 88.72283935546875;
static const float lomark = -103.972084045410;
/* Check for usual case. */
- if (isless (x, himark) && isgreater (x, lomark))
+ if (__builtin_isless (x, himark) && __builtin_isgreater (x, lomark))
{
static const float THREEp42 = 13194139533312.0;
static const float THREEp22 = 12582912.0;
return (float) result;
}
/* Exceptional cases: */
- else if (isless (x, himark))
+ else if (__builtin_isless (x, himark))
{
if (__isinff (x))
/* e^-inf == 0, with no error. */
static char rcsid[] = "$NetBSD: e_log10f.c,v 1.5 1995/05/10 20:45:53 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: e_logf.c,v 1.4 1995/05/10 20:45:54 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: e_powf.c,v 1.7 1996/04/08 15:43:44 phil Exp $";
#endif
-#include "math.h"
#include "math_private.h"
static const float huge = 1.0e+30, tiny = 1.0e-30;
* use __kernel_rem_pio2f()
*/
-#include "math.h"
#include "math_private.h"
/*
static char rcsid[] = "$NetBSD: e_sqrtf.c,v 1.4 1995/05/10 20:46:19 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: k_cosf.c,v 1.4 1995/05/10 20:46:23 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: k_rem_pio2f.c,v 1.4 1995/05/10 20:46:28 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
/* In the float version, the input parameter x contains 8 bit
static char rcsid[] = "$NetBSD: k_sinf.c,v 1.4 1995/05/10 20:46:33 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: k_tanf.c,v 1.4 1995/05/10 20:46:39 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
static char rcsid[] = "$NetBSD: s_atanf.c,v 1.4 1995/05/10 20:46:47 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
* Inexact flag raised if x not equal to floorf(x).
*/
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
* no branching!
*/
-#include "math.h"
#include "math_private.h"
int
static char rcsid[] = "$NetBSD: s_scalbnf.c,v 1.4 1995/05/10 20:48:10 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: s_sinf.c,v 1.4 1995/05/10 20:48:16 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static char rcsid[] = "$NetBSD: s_tanf.c,v 1.4 1995/05/10 20:48:20 jtc Exp $";
#endif
-#include "math.h"
#include "math_private.h"
#ifdef __STDC__
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
- -Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
- -fno-math-errno -fno-trapping-math -ffinite-math-only \
- -fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
+ -Wall -std=c99 -O2 -g \
+ -msse2 -msseregparm -mfpmath=sse -march=pentium3 -mtune=generic \
+ -fno-math-errno -fno-trapping-math -fno-rounding-math -fno-signaling-nans
libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_acosf.c \
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
- -Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
- -fno-math-errno -fno-trapping-math -ffinite-math-only \
- -fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
+ -Wall -std=c99 -O2 -g \
+ -msse2 -msseregparm -mfpmath=sse -march=pentium3 -mtune=generic \
+ -fno-math-errno -fno-trapping-math -fno-rounding-math -fno-signaling-nans
libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_acosf.c \
extern float __kernel_tanf (float,float,int);
extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
+extern float __atanf (float);
+extern float __scalbnf (float x, int n);
+extern float __floorf(float x);
+extern int __isinff(float x);
+
/* internal functions. */
extern float __copysignf (float x, float __y);
extern double __slowexp (double __x);
extern double __slowpow (double __x, double __y, double __z);
extern void __docos (double __x, double __dx, double __v[]);
+extern double __scalbn (double x, int n);
+extern double __floor(double x);
+
+/* Prototypes for C99 math functions provided by GCC builtins. */
+extern double fabs(double);
+extern float fabsf(float);
#endif /* _MATH_PRIVATE_H_ */