Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu If TARGET_FLOAT_FORMAT is not IEEE_FLOAT_FORMAT (i.e. we...
details: https://anonhg.NetBSD.org/src/rev/e72053973447
branches: trunk
changeset: 747765:e72053973447
user: martin <martin%NetBSD.org@localhost>
date: Thu Oct 01 20:07:09 2009 +0000
description:
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.
diffstat:
gnu/dist/gcc4/gcc/libgcc2.c | 10 +++++++++-
gnu/lib/libgcc4/Makefile.inc | 4 +---
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (81 lines):
diff -r 20ca341d8f99 -r e72053973447 gnu/dist/gcc4/gcc/libgcc2.c
--- a/gnu/dist/gcc4/gcc/libgcc2.c Thu Oct 01 19:02:27 2009 +0000
+++ b/gnu/dist/gcc4/gcc/libgcc2.c Thu Oct 01 20:07:09 2009 +0000
@@ -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. */
diff -r 20ca341d8f99 -r e72053973447 gnu/lib/libgcc4/Makefile.inc
--- a/gnu/lib/libgcc4/Makefile.inc Thu Oct 01 19:02:27 2009 +0000
+++ b/gnu/lib/libgcc4/Makefile.inc Thu Oct 01 20:07:09 2009 +0000
@@ -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}
Home |
Main Index |
Thread Index |
Old Index