about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-16 21:31:43 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-16 21:31:43 +0000
commitba3752d5322448ab54b71c82e63a09542042a3b6 (patch)
tree7d0abe72b771849f27327fbbeb08c2260662e0a3
parent778e0ef71de6430ca6af4410453e675bd96b040f (diff)
downloadglibc-ba3752d5322448ab54b71c82e63a09542042a3b6.tar.gz
glibc-ba3752d5322448ab54b71c82e63a09542042a3b6.tar.xz
glibc-ba3752d5322448ab54b71c82e63a09542042a3b6.zip
Update.
2001-07-16  Andreas Schwab  <schwab@suse.de>

	* sysdeps/posix/spawni.c: Fix typo when iterating over signal numbers.

2001-07-16  Andreas Schwab  <schwab@suse.de>

	* math/libm-test.inc (check_float_internal): Fix sign bit test of
	infinities.

2001-07-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Make it PIC friendly.
-rw-r--r--ChangeLog13
-rw-r--r--math/libm-test.inc10
-rw-r--r--sysdeps/i386/fpu/e_expl.c10
-rw-r--r--sysdeps/posix/spawni.c2
4 files changed, 24 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index ac2c57caa3..8995df7da1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2001-07-16  Andreas Schwab  <schwab@suse.de>
+
+	* sysdeps/posix/spawni.c: Fix typo when iterating over signal numbers.
+
+2001-07-16  Andreas Schwab  <schwab@suse.de>
+
+	* math/libm-test.inc (check_float_internal): Fix sign bit test of
+	infinities.
+
+2001-07-16  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Make it PIC friendly.
+
 2001-07-15  Ulrich Drepper  <drepper@redhat.com>
 
 	* malloc/obstack.c: Define __attribute__ for non-gcc compilers.
diff --git a/math/libm-test.inc b/math/libm-test.inc
index bacd8d9d4e..118f00a9ba 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -460,8 +460,8 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
   else if (isinf (computed) && isinf (expected))
     {
       /* Test for sign of infinities.  */
-      if (((exceptions & IGNORE_ZERO_INF_SIGN) == 0)
-	  && (isinf (computed) != isinf (expected)))
+      if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
+	  && signbit (computed) != signbit (expected))
 	{
 	  ok = 0;
 	  printf ("infinity has wrong sign.\n");
@@ -482,9 +482,9 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
 	ulp = diff / FUNC(ldexp) (1.0, FUNC(ilogb) (expected) - MANT_DIG);
       set_max_error (ulp, curr_max_error);
       print_diff = 1;
-      if (((exceptions & IGNORE_ZERO_INF_SIGN) == 0)
-	  && (computed == 0.0 && expected == 0.0
-	      && signbit(computed) != signbit (expected)))
+      if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
+	  && computed == 0.0 && expected == 0.0
+	  && signbit(computed) != signbit (expected))
 	ok = 0;
       else if (ulp == 0.0 || (ulp <= max_ulp && !ignore_max_ulp))
 	ok = 1;
diff --git a/sysdeps/i386/fpu/e_expl.c b/sysdeps/i386/fpu/e_expl.c
index 37d8d10e2c..a090d0dabc 100644
--- a/sysdeps/i386/fpu/e_expl.c
+++ b/sysdeps/i386/fpu/e_expl.c
@@ -24,8 +24,8 @@
 
 #include <math_private.h>
 
-static long double __attribute__ ((unused)) c0 = 1.44268798828125L;
-static long double __attribute__ ((unused)) c1 = 7.05260771340735992468e-6L;
+static long double c0 = 1.44268798828125L;
+static long double c1 = 7.05260771340735992468e-6L;
 
 long double
 __ieee754_expl (long double x)
@@ -48,7 +48,7 @@ __ieee754_expl (long double x)
        "fld %%st(1)\n\t"        /* 2  x               */
        "frndint\n\t"            /* 2  xi              */
        "fld %%st(1)\n\t"        /* 3  i               */
-       "fldt c0\n\t"            /* 4  c0              */
+       "fldt %2\n\t"            /* 4  c0              */
        "fld %%st(2)\n\t"        /* 5  xi              */
        "fmul %%st(1),%%st\n\t"  /* 5  c0 xi           */
        "fsubp %%st,%%st(2)\n\t" /* 4  f = c0 xi  - i  */
@@ -56,7 +56,7 @@ __ieee754_expl (long double x)
        "fsub %%st(3),%%st\n\t"  /* 5  xf = x - xi     */
        "fmulp %%st,%%st(1)\n\t" /* 4  c0 xf           */
        "faddp %%st,%%st(1)\n\t" /* 3  f = f + c0 xf   */
-       "fldt c1\n\t"            /* 4                  */
+       "fldt %3\n\t"            /* 4                  */
        "fmul %%st(4),%%st\n\t"  /* 4  c1 * x          */
        "faddp %%st,%%st(1)\n\t" /* 3  f = f + c1 * x  */
        "f2xm1\n\t"		/* 3 2^(fract(x * log2(e))) - 1 */
@@ -72,6 +72,6 @@ __ieee754_expl (long double x)
        "fstp	%%st\n\t"
        "fldz\n\t"		/* Set result to 0.  */
        "2:\t\n"
-       : "=t" (res) : "0" (x) : "ax", "dx");
+       : "=t" (res) : "0" (x), "m" (c0), "m" (c1) : "ax", "dx");
   return res;
 }
diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c
index a1f3ac155b..330f2192a7 100644
--- a/sysdeps/posix/spawni.c
+++ b/sysdeps/posix/spawni.c
@@ -112,7 +112,7 @@ __spawni (pid_t *pid, const char *file,
       memset (&sa, '\0', sizeof (sa));
       sa.sa_handler = SIG_DFL;
 
-      for (sig = 1; sig >= _NSIG; ++sig)
+      for (sig = 1; sig <= _NSIG; ++sig)
 	if (sigismember (&attrp->__sd, sig) != 0
 	    && __sigaction (sig, &sa, NULL) != 0)
 	  _exit (SPAWN_ERROR);