[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22079 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/s390/ nptl/sysdeps/unix/sysv/linux/sparc/ string/ sysdeps...



Author: eglibc
Date: Fri Dec 28 00:02:00 2012
New Revision: 22079

Log:
Import glibc-mainline for 2012-12-28

Removed:
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.h
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
    fsf/trunk/libc/string/xpg-strerror.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.h
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan2.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.c
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.h
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.c
    fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
    fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Dec 28 00:02:00 2012
@@ -1,3 +1,28 @@
+2012-12-27  Bruno Haible  <bruno@xxxxxxxxx>
+
+	[BZ #14317]
+	* string/xpg-strerror.c (__xpg_strerror_r): Optimize, call strlen
+	only if needed.
+
+2012-12-27  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Eliminate __mpexp_nn
+	and use variable directly.
+	* sysdeps/ieee754/dbl-64/mpexp.h (__mpexp_nn): Remove.
+
+	* sysdeps/ieee754/dbl-64/mpa.c [! NO__CONST]: New constant
+	MPONE.
+	* sysdeps/ieee754/dbl-64/mpa.h: Declare MPONE.
+	* sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Remove local
+	variable MPONE.
+	* sysdeps/ieee754/dbl-64/mpatan2.c (__mpatan2): Likewise.
+	* sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Likewise.
+	* sysdeps/ieee754/dbl-64/mplog.c (__mplog): Remove mplog.h
+	include directive.  Remove local variable MPONE.
+	* sysdeps/ieee754/dbl-64/mplog.h: Remove.
+	* sysdeps/x86_64/fpu/multiarch/mpa-avx.c: Define NO__CONST.
+	* sysdeps/x86_64/fpu/multiarch/mpa-fma4.c: Likewise.
+
 2012-12-25  David S. Miller  <davem@xxxxxxxxxxxxx>
 
 	* version.h (RELEASE): Set to "development".

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Dec 28 00:02:00 2012
@@ -8,6 +8,8 @@
 Version 2.18
 
 * The following bugs are resolved with this release:
+
+  14317.
 
 
 Version 2.17

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Dec 28 00:02:00 2012
@@ -1,3 +1,19 @@
+2012-12-27  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h
+	(lll_futex_timed_wait_bitset): New macro.
+
+2012-12-27  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
+	Remove definition.
+	(lll_futex_timed_wait): Replace assembly code with
+	INTERNAL_SYSCALL.
+	(lll_futex_timed_wait_bitset): Likewise.
+	(lll_futex_wake): Likewise.
+	(lll_futex_requeue): Likewise.
+	(lll_futex_wake_unlock): Likewise.
+
 2012-12-08  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h Fri Dec 28 00:02:00 2012
@@ -76,59 +76,34 @@
 #define lll_futex_wait(futex, val, private) \
   lll_futex_timed_wait (futex, val, NULL, private)
 
-#define lll_futex_timed_wait(futex, val, timespec, private) \
-  ({									      \
-    register unsigned long int __r2 asm ("2") = (unsigned long int) (futex);  \
-    register unsigned long int __r3 asm ("3")				      \
-      = __lll_private_flag (FUTEX_WAIT, private);			      \
-    register unsigned long int __r4 asm ("4") = (unsigned long int) (val);    \
-    register unsigned long int __r5 asm ("5") = (unsigned long int)(timespec);\
-    register unsigned long int __result asm ("2");			      \
-									      \
-    __asm __volatile ("svc %b1"						      \
-		      : "=d" (__result)					      \
-		      : "i" (SYS_futex), "0" (__r2), "d" (__r3),	      \
-			"d" (__r4), "d" (__r5)				      \
-		      : "cc", "memory" );				      \
-    __result;								      \
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+									      \
+    INTERNAL_SYSCALL (futex, __err, 4, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAIT, private),	      \
+			      (val), (timespec));			      \
   })
 
 #define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
   ({									      \
-    register unsigned long int __r2 asm ("2") = (unsigned long int) (futexp); \
-    register unsigned long int __r3 asm ("3")				      \
-      = __lll_private_flag ((FUTEX_WAIT_BITSET | clockbit), private);	      \
-    register unsigned long int __r4 asm ("4") = (long int) (val);	      \
-    register unsigned long int __r5 asm ("5") = (long int) (timespec);	      \
-    register unsigned long int __r6 asm ("6") = (unsigned long int) (NULL);   \
-    register unsigned long int __r7 asm ("7")				      \
-      = (unsigned int) (FUTEX_BITSET_MATCH_ANY);			      \
-    register unsigned long __result asm ("2");				      \
-									      \
-    __asm __volatile ("svc %b1"						      \
-		      : "=d" (__result)					      \
-		      : "i" (SYS_futex), "0" (__r2), "d" (__r3),	      \
-			"d" (__r4), "d" (__r5), "d" (__r6), "d" (__r7)	      \
-		      : "cc", "memory" );				      \
-    __result;								      \
-  })
-
-
-#define lll_futex_wake(futex, nr, private) \
-  ({									      \
-    register unsigned long int __r2 asm ("2") = (unsigned long int) (futex);  \
-    register unsigned long int __r3 asm ("3")				      \
-      = __lll_private_flag (FUTEX_WAKE, private);			      \
-    register unsigned long int __r4 asm ("4") = (unsigned long int) (nr);     \
-    register unsigned long int __result asm ("2");			      \
-									      \
-    __asm __volatile ("svc %b1"						      \
-		      : "=d" (__result)					      \
-		      : "i" (SYS_futex), "0" (__r2), "d" (__r3), "d" (__r4)   \
-		      : "cc", "memory" );				      \
-    __result;								      \
-  })
-
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    int __op = FUTEX_WAIT_BITSET | clockbit;				      \
+									      \
+    INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (__op, private),	      \
+			      (val), (timespec), NULL /* Unused.  */, 	      \
+			      FUTEX_BITSET_MATCH_ANY);			      \
+  })
+
+#define lll_futex_wake(futexp, nr, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+									      \
+    INTERNAL_SYSCALL (futex, __err, 4, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAKE, private),	      \
+			      (nr), 0);					      \
+  })
 
 #define lll_robust_dead(futexv, private) \
   do									      \
@@ -142,47 +117,29 @@
 
 
 /* Returns non-zero if error happened, zero if success.  */
-#define lll_futex_requeue(futex, nr_wake, nr_move, mutex, val, private) \
-  ({									      \
-    register unsigned long int __r2 asm ("2") = (unsigned long int) (futex);  \
-    register unsigned long int __r3 asm ("3")				      \
-      = __lll_private_flag (FUTEX_CMP_REQUEUE, private);		      \
-    register unsigned long int __r4 asm ("4") = (long int) (nr_wake);	      \
-    register unsigned long int __r5 asm ("5") = (long int) (nr_move);	      \
-    register unsigned long int __r6 asm ("6") = (unsigned long int) (mutex);  \
-    register unsigned long int __r7 asm ("7") = (int) (val);		      \
-    register unsigned long __result asm ("2");				      \
-									      \
-    __asm __volatile ("svc %b1"						      \
-		      : "=d" (__result)					      \
-		      : "i" (SYS_futex), "0" (__r2), "d" (__r3),	      \
-			"d" (__r4), "d" (__r5), "d" (__r6), "d" (__r7)	      \
-		      : "cc", "memory" );				      \
-    __result > -4096UL;							      \
-  })
-
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+									      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+			      (nr_wake), (nr_move), (mutex), (val));	      \
+    INTERNAL_SYSCALL_ERROR_P (__ret, __err);				      \
+  })
 
 /* Returns non-zero if error happened, zero if success.  */
-#define lll_futex_wake_unlock(futex, nr_wake, nr_wake2, futex2, private) \
-  ({									      \
-    register unsigned long int __r2 asm ("2") = (unsigned long int) (futex);  \
-    register unsigned long int __r3 asm ("3")				      \
-      = __lll_private_flag (FUTEX_WAKE_OP, private);			      \
-    register unsigned long int __r4 asm ("4") = (long int) (nr_wake);	      \
-    register unsigned long int __r5 asm ("5") = (long int) (nr_wake2);	      \
-    register unsigned long int __r6 asm ("6") = (unsigned long int) (futex2); \
-    register unsigned long int __r7 asm ("7")				      \
-      = (int) FUTEX_OP_CLEAR_WAKE_IF_GT_ONE;				      \
-    register unsigned long __result asm ("2");				      \
-									      \
-    __asm __volatile ("svc %b1"						      \
-		      : "=d" (__result)					      \
-		      : "i" (SYS_futex), "0" (__r2), "d" (__r3),	      \
-			"d" (__r4), "d" (__r5), "d" (__r6), "d" (__r7)	      \
-		      : "cc", "memory" );				      \
-    __result > -4096UL;							      \
-  })
-
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+									      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (FUTEX_WAKE_OP, private),    \
+			      (nr_wake), (nr_wake2), (futexp2),		      \
+			      FUTEX_OP_CLEAR_WAKE_IF_GT_ONE);		      \
+    INTERNAL_SYSCALL_ERROR_P (__ret, __err);				      \
+  })
 
 #define lll_compare_and_swap(futex, oldval, newval, operation) \
   do {									      \

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h Fri Dec 28 00:02:00 2012
@@ -95,6 +95,19 @@
     __ret;								      \
   })
 
+#define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    int __op = FUTEX_WAIT_BITSET | clockbit;				      \
+									      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (__op, private),	      \
+			      (val), (timespec), NULL /* Unused.  */, 	      \
+			      FUTEX_BITSET_MATCH_ANY);			      \
+    __ret;		      						      \
+  })
+
 #define lll_futex_wake(futexp, nr, private) \
   ({									      \
     INTERNAL_SYSCALL_DECL (__err);					      \

Modified: fsf/trunk/libc/string/xpg-strerror.c
==============================================================================
--- fsf/trunk/libc/string/xpg-strerror.c (original)
+++ fsf/trunk/libc/string/xpg-strerror.c Fri Dec 28 00:02:00 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995-1998, 2000, 2002, 2004, 2010, 2011
-   Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -28,20 +27,27 @@
 __xpg_strerror_r (int errnum, char *buf, size_t buflen)
 {
   const char *estr = __strerror_r (errnum, buf, buflen);
-  size_t estrlen = strlen (estr);
 
+  /* We know that __strerror_r returns buf (with a dynamically computed
+     string) if errnum is invalid, otherwise it returns a string whose
+     storage has indefinite extent.  */
   if (estr == buf)
     {
       assert (errnum < 0 || errnum >= _sys_nerr_internal
 	      || _sys_errlist_internal[errnum] == NULL);
       return EINVAL;
     }
-  assert (errnum >= 0 && errnum < _sys_nerr_internal
-	  && _sys_errlist_internal[errnum] != NULL);
+  else
+    {
+      assert (errnum >= 0 && errnum < _sys_nerr_internal
+	      && _sys_errlist_internal[errnum] != NULL);
 
-  /* Terminate the string in any case.  */
-  if (buflen > 0)
-    *((char *) __mempcpy (buf, estr, MIN (buflen - 1, estrlen))) = '\0';
+      size_t estrlen = strlen (estr);
 
-  return buflen <= estrlen ? ERANGE : 0;
+      /* Terminate the string in any case.  */
+      if (buflen > 0)
+	*((char *) __mempcpy (buf, estr, MIN (buflen - 1, estrlen))) = '\0';
+
+      return buflen <= estrlen ? ERANGE : 0;
+    }
 }

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.c Fri Dec 28 00:02:00 2012
@@ -51,6 +51,10 @@
 # define SECTION
 #endif
 
+#ifndef NO__CONST
+const mp_no mpone = {1, {1.0, 1.0}};
+#endif
+
 #ifndef NO___ACR
 /* mcr() compares the sizes of the mantissas of two multiple precision  */
 /* numbers. Mantissas are compared regardless of the signs of the       */

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpa.h Fri Dec 28 00:02:00 2012
@@ -54,6 +54,8 @@
 
 typedef union { int i[2]; double d; } number;
 
+extern const mp_no mpone;
+
 #define  X   x->d
 #define  Y   y->d
 #define  Z   z->d

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan.c Fri Dec 28 00:02:00 2012
@@ -48,9 +48,6 @@
   int i,m,n;
   double dx;
   mp_no
-    mpone    = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
     mptwo    = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
 		0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
 		0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
@@ -60,7 +57,7 @@
 
   mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3;
 
-		      /* Choose m and initiate mpone, mptwo & mptwoim1 */
+		      /* Choose m and initiate mptwo & mptwoim1 */
     if      (EX>0) m=7;
     else if (EX<0) m=0;
     else {
@@ -68,8 +65,8 @@
       for (m=6; m>0; m--)
 	{if (dx>__atan_xm[m].d) break;}
     }
-    mpone.e    = mptwo.e    = mptwoim1.e = 1;
-    mpone.d[0] = mpone.d[1] = mptwo.d[0] = mptwoim1.d[0] = ONE;
+    mptwo.e    = mptwoim1.e = 1;
+    mptwo.d[0] = mptwoim1.d[0] = ONE;
     mptwo.d[1] = TWO;
 
 				 /* Reduce x m times */

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan2.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan2.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpatan2.c Fri Dec 28 00:02:00 2012
@@ -51,14 +51,10 @@
 
   static const double ZERO = 0.0, ONE = 1.0;
 
-  mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
   mp_no mpt1,mpt2,mpt3;
 
 
   if (X[0] <= ZERO) {
-    mpone.e = 1;                 mpone.d[0] = mpone.d[1] = ONE;
     __dvd(x,y,&mpt1,p);          __mul(&mpt1,&mpt1,&mpt2,p);
     if (mpt1.d[0] != ZERO)       mpt1.d[0] = ONE;
     __add(&mpt2,&mpone,&mpt3,p); __mpsqrt(&mpt3,&mpt2,p);

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.c Fri Dec 28 00:02:00 2012
@@ -56,9 +56,6 @@
 		 { 0, 0, 0, 0, 0, 0,23,28,33,38,42,47,52,57,62,66, 0, 0},
 		 { 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 0,39,43,47,51,55,59,63},
 		 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43,47,50,54}};
-  mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
   mp_no mpk   = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
 		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
 		    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
@@ -84,13 +81,12 @@
   __mul(x,&mpt1,&mps,p);
 
   /* Evaluate the polynomial. Put result in mpt2 */
-  mpone.e=1;   mpone.d[0]=ONE;   mpone.d[1]=ONE;
-  mpk.e = 1;   mpk.d[0] = ONE;   mpk.d[1]=__mpexp_nn[n].d;
+  mpk.e = 1;   mpk.d[0] = ONE;   mpk.d[1]=n;
   __dvd(&mps,&mpk,&mpt1,p);
   __add(&mpone,&mpt1,&mpak,p);
   for (k=n-1; k>1; k--) {
     __mul(&mps,&mpak,&mpt1,p);
-    mpk.d[1]=__mpexp_nn[k].d;
+    mpk.d[1] = k;
     __dvd(&mpt1,&mpk,&mpt2,p);
     __add(&mpone,&mpt2,&mpak,p);
   }

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mpexp.h Fri Dec 28 00:02:00 2012
@@ -28,7 +28,6 @@
 #define MPEXP_H
 
 extern const number __mpexp_twomm1[33] attribute_hidden;
-extern const number __mpexp_nn[9] attribute_hidden;
 extern const number __mpexp_radix attribute_hidden;
 extern const number __mpexp_radixi attribute_hidden;
 extern const number __mpexp_zero attribute_hidden;
@@ -74,18 +73,6 @@
 /**/                  {{0x3b300000, 0x00000000} }, /* 2**-76 */
 /**/                  {{0x3b100000, 0x00000000} }, /* 2**-78 */
 /**/                  {{0x3ae00000, 0x00000000} }, /* 2**-81 */
-  };
-  const number
-	       __mpexp_nn[9]={                     /* n      */
-/**/                  {{0x00000000, 0x00000000} }, /* 0      */
-/**/                  {{0x3ff00000, 0x00000000} }, /* 1      */
-/**/                  {{0x40000000, 0x00000000} }, /* 2      */
-/**/                  {{0x40080000, 0x00000000} }, /* 3      */
-/**/                  {{0x40100000, 0x00000000} }, /* 4      */
-/**/                  {{0x40140000, 0x00000000} }, /* 5      */
-/**/                  {{0x40180000, 0x00000000} }, /* 6      */
-/**/                  {{0x401c0000, 0x00000000} }, /* 7      */
-/**/                  {{0x40200000, 0x00000000} }, /* 8      */
   };
 
   const number
@@ -135,19 +122,6 @@
 /**/                  {{0x00000000, 0x3ae00000} }, /* 2**-81 */
   };
   const number
-	       __mpexp_nn[9]={                     /* n      */
-/**/                  {{0x00000000, 0x00000000} }, /* 0      */
-/**/                  {{0x00000000, 0x3ff00000} }, /* 1      */
-/**/                  {{0x00000000, 0x40000000} }, /* 2      */
-/**/                  {{0x00000000, 0x40080000} }, /* 3      */
-/**/                  {{0x00000000, 0x40100000} }, /* 4      */
-/**/                  {{0x00000000, 0x40140000} }, /* 5      */
-/**/                  {{0x00000000, 0x40180000} }, /* 6      */
-/**/                  {{0x00000000, 0x401c0000} }, /* 7      */
-/**/                  {{0x00000000, 0x40200000} }, /* 8      */
-  };
-
-  const number
 /**/ __mpexp_radix    = {{0x00000000, 0x41700000} }, /* 2**24  */
 /**/ __mpexp_radixi   = {{0x00000000, 0x3e700000} }, /* 2**-24 */
 /**/ __mpexp_zero     = {{0x00000000, 0x00000000} }, /* 0      */

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.c Fri Dec 28 00:02:00 2012
@@ -40,21 +40,13 @@
 void __mpexp(mp_no *, mp_no *, int);
 
 void __mplog(mp_no *x, mp_no *y, int p) {
-#include "mplog.h"
   int i,m;
-#if 0
-  int j,k,m1,m2,n;
-  double a,b;
-#endif
   static const int mp[33] = {0,0,0,0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
                              4,4,4,4,4,4,4,4,4,4,4,4,4,4};
-  mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
-                    0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
   mp_no mpt1,mpt2;
 
-  /* Choose m and initiate mpone */
-  m = mp[p];  mpone.e = 1;  mpone.d[0]=mpone.d[1]=ONE;
+  /* Choose m */
+  m = mp[p];
 
   /* Perform m newton iterations to solve for y: exp(y)-x=0.     */
   /* The iterations formula is:  y(n+1)=y(n)+(x*exp(-y(n))-1).   */

Removed: fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.h
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.h (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/mplog.h (removed)
@@ -1,44 +1,0 @@
-/*
- * IBM Accurate Mathematical Library
- * Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-/******************************************************************/
-/*                                                                */
-/* MODULE_NAME:mplog.h                                            */
-/*                                                                */
-/* common data and variables prototype and definition             */
-/******************************************************************/
-
-#ifndef MPLOG_H
-#define MPLOG_H
-
-#ifdef BIG_ENDI
-  static const number
-/**/ one            = {{0x3ff00000, 0x00000000} }; /* 1      */
-
-#else
-#ifdef LITTLE_ENDI
-  static const number
-/**/ one            = {{0x00000000, 0x3ff00000} }; /* 1      */
-
-#endif
-#endif
-
-#define  ONE       one.d
-
-#endif

Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-avx.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-avx.c Fri Dec 28 00:02:00 2012
@@ -7,6 +7,7 @@
 #define NO___CPY 1
 #define NO___MP_DBL 1
 #define NO___ACR 1
+#define NO__CONST 1
 #define SECTION __attribute__ ((section (".text.avx")))
 
 #include <sysdeps/ieee754/dbl-64/mpa.c>

Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c Fri Dec 28 00:02:00 2012
@@ -7,6 +7,7 @@
 #define NO___CPY 1
 #define NO___MP_DBL 1
 #define NO___ACR 1
+#define NO__CONST 1
 #define SECTION __attribute__ ((section (".text.fma4")))
 
 #include <sysdeps/ieee754/dbl-64/mpa.c>

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits