Module Name: src Committed By: martin Date: Thu Oct 1 20:07:09 UTC 2009
Modified Files: src/gnu/dist/gcc4/gcc: libgcc2.c src/gnu/lib/libgcc4: Makefile.inc Log Message: If TARGET_FLOAT_FORMAT is not IEEE_FLOAT_FORMAT (i.e. we have no NaNs), do not compile special code to fix up different NaN values. Re-enable complex support functions in libgcc for vax. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 src/gnu/dist/gcc4/gcc/libgcc2.c cvs rdiff -u -r1.13 -r1.14 src/gnu/lib/libgcc4/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/gnu/dist/gcc4/gcc/libgcc2.c diff -u src/gnu/dist/gcc4/gcc/libgcc2.c:1.1.1.3 src/gnu/dist/gcc4/gcc/libgcc2.c:1.2 --- src/gnu/dist/gcc4/gcc/libgcc2.c:1.1.1.3 Thu Jan 11 02:35:28 2007 +++ src/gnu/dist/gcc4/gcc/libgcc2.c Thu Oct 1 20:07:09 2009 @@ -1618,7 +1618,9 @@ #define isfinite(x) __builtin_expect (!isnan((x) - (x)), 1) #define isinf(x) __builtin_expect (!isnan(x) & !isfinite(x), 0) +#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT #define INFINITY CONCAT2(__builtin_inf, CEXT) () +#endif #define I 1i /* Helpers to make the following code slightly less gross. */ @@ -1626,7 +1628,9 @@ #define FABS CONCAT2(__builtin_fabs, CEXT) /* Verify that MTYPE matches up with CEXT. */ +#ifdef INFINITY extern void *compile_type_assert[sizeof(INFINITY) == sizeof(MTYPE) ? 1 : -1]; +#endif /* Ensure that we've lost any extra precision. */ #if NOTRUNC @@ -1656,6 +1660,7 @@ x = ac - bd; y = ad + bc; +#ifdef INFINITY if (isnan (x) && isnan (y)) { /* Recover infinities that computed as NaN + iNaN. */ @@ -1697,6 +1702,7 @@ y = INFINITY * (a * d + b * c); } } +#endif return x + I * y; } @@ -1731,6 +1737,7 @@ /* Recover infinities and zeros that computed as NaN+iNaN; the only cases are nonzero/zero, infinite/finite, and finite/infinite. */ +#ifdef INFINITY if (isnan (x) && isnan (y)) { if (c == 0.0 && d == 0.0 && (!isnan (a) || !isnan (b))) @@ -1753,11 +1760,12 @@ y = 0.0 * (b * c - a * d); } } +#endif return x + I * y; } #endif /* complex divide */ - +#undef INFINITY #endif /* all complex float routines */ /* From here on down, the routines use normal data types. */ Index: src/gnu/lib/libgcc4/Makefile.inc diff -u src/gnu/lib/libgcc4/Makefile.inc:1.13 src/gnu/lib/libgcc4/Makefile.inc:1.14 --- src/gnu/lib/libgcc4/Makefile.inc:1.13 Thu Sep 18 12:20:19 2008 +++ src/gnu/lib/libgcc4/Makefile.inc Thu Oct 1 20:07:09 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.13 2008/09/18 12:20:19 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.14 2009/10/01 20:07:09 martin Exp $ .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk) && ${MKGCC} != "no" .include "${.CURDIR}/../arch/${MACHINE_ARCH}.mk" @@ -27,10 +27,8 @@ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \ _powixf2 _powitf2 \ -.if ${MACHINE_ARCH} != "vax" LIB2FUNCS_ALL+= \ _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 _divxc3 _divtc3 -.endif LIB2FUNCS_SHORT:=${LIB2FUNCS_ALL} LIB2_DIVMOD_FUNCS:=${G_LIB2_DIVMOD_FUNCS}