This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-121-g0be6f6f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".

The branch, master has been updated
       via  0be6f6f707b29cb2b9ac1e446fe8c72c092b0a5e (commit)
       via  2f6ba7629b1a18d560f1ccda89a61ccf1569ab7f (commit)
       via  3278063a823cbbc1931e5c388869a9a45dd50933 (commit)
      from  8b37c8a65094f273f886c9402cb70455155522bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=0be6f6f707b29cb2b9ac1e446fe8c72c092b0a5e

commit 0be6f6f707b29cb2b9ac1e446fe8c72c092b0a5e
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Fri Mar 23 16:34:03 2012 +0100

    m68k: update libm test ULPs

diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index a7f4202..ea4155f 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,5 +1,7 @@
 2012-03-23  Andreas Schwab  <schwab@linux-m68k.org>
 
+	* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
+
 	* sysdeps/m68k/m680x0/fpu/s_cexp.c: Avoid undue overflow.
 
 	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1):
diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps
index f3ae7bb..b153ba9 100644
--- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps
+++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps
@@ -448,6 +448,9 @@ ifloat: 1
 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
 float: 1
 ifloat: 1
+Test "Real part of: cexp (-95 + 0.75 i) == 4.039714446238306526889476684000081624047e-42 + 3.763383677300535390271646960780570275931e-42 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
 float: 2
 ifloat: 2
@@ -456,9 +459,21 @@ float: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: cexp (11356.5625 + 0.75 i) == 9.052188470850960144814815984311663764287e4931 + 8.432986734191301036267148978260970230200e4931 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: cexp (50 + 0x1p127 i) == 4.053997150228616856622417636046265337193e21 + 3.232070315463388524466674772633810238819e21 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: cexp (709.8125 + 0.75 i) == 1.355121963080879535248452862759108365762e308 + 1.262426823598609432507811340856186873507e308 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (88.75 + 0.75 i) == 2.558360358486542817001900410314204322891e38 + 2.383359453227311447654736314679677655100e38 i":
+ildouble: 1
+ldouble: 1
 
 # clog
 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
@@ -1134,8 +1149,8 @@ ifloat: 5
 ildouble: 2
 ldouble: 2
 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
-float: 2
-ifloat: 2
+float: 3
+ifloat: 3
 ildouble: 1
 ldouble: 1
 Test "jn (2, 0x1.ffff62p+99) == -4.43860668048170034334926693188979974489e-16":

http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=2f6ba7629b1a18d560f1ccda89a61ccf1569ab7f

commit 2f6ba7629b1a18d560f1ccda89a61ccf1569ab7f
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Fri Mar 23 16:33:37 2012 +0100

    m68k: avoid undue overflow in cexp

diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 160fb16..a7f4202 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,5 +1,7 @@
 2012-03-23  Andreas Schwab  <schwab@linux-m68k.org>
 
+	* sysdeps/m68k/m680x0/fpu/s_cexp.c: Avoid undue overflow.
+
 	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1):
 	Mark asm as volatile.
 	(__scalbn): Likewise.
diff --git a/sysdeps/m68k/m680x0/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/s_cexp.c
index 62cddbd..c2a9f1d 100644
--- a/sysdeps/m68k/m680x0/fpu/s_cexp.c
+++ b/sysdeps/m68k/m680x0/fpu/s_cexp.c
@@ -17,6 +17,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <float.h>
 #include <complex.h>
 #include <math.h>
 #include "mathimpl.h"
@@ -43,26 +44,46 @@ s(__cexp) (__complex__ float_type x)
   if ((ix_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0)
     {
       /* Imaginary part is finite.  */
-      float_type exp_val = m81(__ieee754_exp) (__real__ x);
+      unsigned long rx_cond = __m81_test (__real__ x);
 
-      __real__ retval = __imag__ retval = exp_val;
-      if (m81(__finite) (exp_val))
+      if ((rx_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0)
 	{
-	  float_type sin_ix, cos_ix;
-	  __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
-		 : "f" (__imag__ x));
-	  __real__ retval *= cos_ix;
+	  const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
+	  long double sin_ix, cos_ix, exp_val;
+
+	  __m81_u (__sincosl) (__imag__ x, &sin_ix, &cos_ix);
+
+	  if (__real__ x > t)
+	    {
+	      long double exp_t = __m81_u(__ieee754_expl) (t);
+	      __real__ x -= t;
+	      sin_ix *= exp_t;
+	      cos_ix *= exp_t;
+	      if (__real__ x > t)
+		{
+		  __real__ x -= t;
+		  sin_ix *= exp_t;
+		  cos_ix *= exp_t;
+		}
+	    }
+
+	  exp_val = __m81_u(__ieee754_expl) (__real__ x);
+	  __real__ retval = exp_val * cos_ix;
 	  if (ix_cond & __M81_COND_ZERO)
 	    __imag__ retval = __imag__ x;
 	  else
-	    __imag__ retval *= sin_ix;
+	    __imag__ retval = exp_val * sin_ix;
 	}
       else
 	{
 	  /* Compute the sign of the result.  */
-	  float_type remainder, pi_2;
+	  long double remainder, pi_2;
 	  int quadrant;
 
+	  if ((rx_cond & (__M81_COND_NAN|__M81_COND_NEG)) == __M81_COND_NEG)
+	    __real__ retval = __imag__ retval = 0.0;
+	  else
+	    __real__ retval = __imag__ retval = __real__ x;
 	  __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
 	  __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
 		 : "=f" (remainder), "=dm" (quadrant)
@@ -83,7 +104,7 @@ s(__cexp) (__complex__ float_type x)
 	      __imag__ retval = -__imag__ retval;
 	      break;
 	    }
-	  if (ix_cond & __M81_COND_ZERO && !m81(__isnan) (exp_val))
+	  if (ix_cond & __M81_COND_ZERO && (rx_cond & __M81_COND_NAN) == 0)
 	    __imag__ retval = __imag__ x;
 	}
     }

http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=3278063a823cbbc1931e5c388869a9a45dd50933

commit 3278063a823cbbc1931e5c388869a9a45dd50933
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Fri Mar 23 13:42:08 2012 +0100

    m68k: prevent gcc from CSEing mathinline asms

diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 50a5e45..160fb16 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,11 @@
+2012-03-23  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1):
+	Mark asm as volatile.
+	(__scalbn): Likewise.
+	(__lrint): Likewise.
+	(__sincos): Likewise.
+
 2012-03-22  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
index 8d4e30a..ffcc39e 100644
--- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
@@ -146,7 +146,8 @@ __NTH (__signbitl (long double __x))
   __m81_defun (float_type, func, (float_type __mathop_x))		      \
   {									      \
     float_type __result;						      \
-    __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+    __asm __volatile__ ("f" __STRING(op) "%.x %1, %0"			      \
+			: "=f" (__result) : "f" (__mathop_x));		      \
     return __result;							      \
   }
 
@@ -243,8 +244,8 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value))	  	  \
   /* There is no branch-condition for infinity,				  \
      so we must extract and examine the condition codes manually.  */	  \
   unsigned long int __fpsr;						  \
-  __asm("ftst%.x %1\n"							  \
-	"fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));	  \
+  __asm ("ftst%.x %1\n"							  \
+	 "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));	  \
   return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;	  \
 }									  \
 									  \
@@ -262,7 +263,8 @@ __m81_defun (float_type, __CONCAT(__scalbn,s),				  \
 	     (float_type __x, int __n))					  \
 {									  \
   float_type __result;							  \
-  __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x));  \
+  __asm __volatile__  ("fscale%.l %1, %0" : "=f" (__result)		  \
+		       : "dmi" (__n), "0" (__x));			  \
   return __result;							  \
 }
 
@@ -279,8 +281,8 @@ __inline_functions(long double,l)
 __m81_defun (int, __CONCAT(__isnan,s), (float_type __value))	  	  \
 {									  \
   char __result;							  \
-  __asm("ftst%.x %1\n"							  \
-	"fsun %0" : "=dm" (__result) : "f" (__value));			  \
+  __asm ("ftst%.x %1\n"							  \
+	 "fsun %0" : "=dm" (__result) : "f" (__value));			  \
   return __result;							  \
 }
 
@@ -319,7 +321,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x))	  \
 __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x))		  \
 {									  \
   long int __result;							  \
-  __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));		  \
+  __asm __volatile__ ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));  \
   return __result;							  \
 }
 
@@ -337,8 +339,8 @@ __m81_inline void							\
 __NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
 				     float_type *__cosx))		\
 {									\
-  __asm ("fsincos%.x %2,%1:%0"						\
-	 : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x));			\
+  __asm __volatile__ ("fsincos%.x %2,%1:%0"				\
+		      : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x));	\
 }
 
 __inline_functions (double,)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.m68k                            |   12 ++++++++
 sysdeps/m68k/m680x0/fpu/bits/mathinline.h |   20 ++++++++------
 sysdeps/m68k/m680x0/fpu/libm-test-ulps    |   19 ++++++++++++-
 sysdeps/m68k/m680x0/fpu/s_cexp.c          |   41 ++++++++++++++++++++++-------
 4 files changed, 71 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
Community source repository for glibc add-on ports


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]