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

[Commits] r16655 - in /fsf/trunk/libc: ./ sysdeps/ieee754/dbl-64/wordsize-64/ sysdeps/powerpc/powerpc32/ sysdeps/unix/sysv/linux/power...



Author: eglibc
Date: Fri Jan 13 00:02:02 2012
New Revision: 16655

Log:
Import glibc-mainline for 2012-01-13

Added:
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/sysdep.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jan 13 00:02:02 2012
@@ -1,4 +1,14 @@
+2012-01-04  Will Schmidt  <will_schmidt@xxxxxxxxxxxx>
+
+	* powerpc/powerpc32/sysdep.h: Add GLUE and GENERATE_GOT_LABEL macros.
+	* unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: Call
+	macro to ensure uniqueness of label name.
+	* unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: Likewise.
+	* unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: Likewise.
+
 2012-01-11  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c: New file.
 
 	* sysdeps/ieee754/dbl-64/s_scalbln.c: Add branch prediction.
 	* sysdeps/ieee754/flt-32/s_scalblnf.c: Likewise.

Added: fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c Fri Jan 13 00:02:02 2012
@@ -1,0 +1,67 @@
+/* Optimized for 64-bit by Ulrich Drepper <drepper@xxxxxxxxx>, 2012 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_acosh(x)
+ * Method :
+ *	Based on
+ *		acosh(x) = log [ x + sqrt(x*x-1) ]
+ *	we have
+ *		acosh(x) := log(x)+ln2,	if x is large; else
+ *		acosh(x) := log(2x-1/(sqrt(x*x-1)+x)) if x>2; else
+ *		acosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1.
+ *
+ * Special cases:
+ *	acosh(x) is NaN with signal if x<1.
+ *	acosh(NaN) is NaN without signal.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+static const double
+one	= 1.0,
+ln2	= 6.93147180559945286227e-01;  /* 0x3FE62E42, 0xFEFA39EF */
+
+double
+__ieee754_acosh (double x)
+{
+  int64_t hx;
+  EXTRACT_WORDS64 (hx, x);
+
+  if (hx > INT64_C (0x4000000000000000))
+    {
+      if (__builtin_expect (hx >= INT64_C (0x41b0000000000000), 0))
+	{
+	  /* x > 2**28 */
+	  if (hx >= INT64_C (0x7ff0000000000000))
+	    /* x is inf of NaN */
+	    return x + x;
+	  else
+	    return __ieee754_log (x) + ln2;/* acosh(huge)=log(2x) */
+	}
+
+      /* 2**28 > x > 2 */
+      double t = x * x;
+      return __ieee754_log (2.0 * x - one / (x + __ieee754_sqrt (t - one)));
+    }
+  else if (__builtin_expect (hx > INT64_C (0x3ff0000000000000), 1))
+    {
+      /* 1<x<2 */
+      double t = x - one;
+      return __log1p (t + __ieee754_sqrt (2.0 * t + t * t));
+    }
+  else if (__builtin_expect (hx == INT64_C (0x3ff0000000000000), 1))
+    return 0.0;				/* acosh(1) = 0 */
+  else					/* x < 1 */
+    return (x - x) / (x - x);
+}
+strong_alias (__ieee754_acosh, __acosh_finite)

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/sysdep.h Fri Jan 13 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Assembly macros for 32-bit PowerPC.
-   Copyright (C) 1999, 2001, 2002, 2003, 2006, 2011
+   Copyright (C) 1999, 2001, 2002, 2003, 2006, 2011, 2012
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -93,7 +93,7 @@
   ASM_SIZE_DIRECTIVE(name)
 
 #define DO_CALL(syscall)				      		      \
-    li 0,syscall;						              \
+    li 0,syscall;							      \
     sc
 
 #undef JUMPTARGET
@@ -153,6 +153,10 @@
 #undef L
 #define L(x) .L##x
 
+#define XGLUE(a,b) a##b
+#define GLUE(a,b) XGLUE (a,b)
+#define GENERATE_GOT_LABEL(name) GLUE (.got_label, name)
+
 /* Label in text section.  */
 #define C_TEXT(name) name
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S Fri Jan 13 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Save current context, powerpc32 common.
-   Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2011, 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
@@ -18,13 +18,13 @@
    02110-1301 USA.  */
 
 /* This is the common implementation of getcontext for powerpc32.
-   It not complete in itself should be included in to a framework that 
+   It not complete in itself should be included in to a framework that
    defines:
      __CONTEXT_FUNC_NAME
    and if appropriate:
      __CONTEXT_ENABLE_FPRS
      __CONTEXT_ENABLE_VRS
-   Any archecture that implements the Vector unit is assumed to also 
+   Any archecture that implements the Vector unit is assumed to also
    implement the floating unit.  */
 
 /* Stack frame offsets.  */
@@ -145,6 +145,7 @@
 # ifdef __CONTEXT_ENABLE_VRS
 #  ifdef PIC
 	mflr    r8
+#  define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
 	SETUP_GOT_ACCESS(r7,got_label)
 	addis	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
 	addi	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
@@ -165,9 +166,9 @@
 
 	la	r10,(_UC_VREGS)(r3)
 	la	r9,(_UC_VREGS+16)(r3)
-	
+
 	beq	2f	/* L(no_vec) */
-/* address of the combined VSCR/VSAVE quadword.  */	
+/* address of the combined VSCR/VSAVE quadword.  */
 	la	r8,(_UC_VREGS+512)(r3)
 
 /* Save the vector registers */
@@ -186,7 +187,7 @@
 	addi  r9,r9,32
 
 	stvx	v0,0,r8
-	
+
 	stvx  v4,0,r10
 	stvx  v5,0,r9
 	addi  r10,r10,32
@@ -277,4 +278,3 @@
 	mtlr	r0
 	blr
 END(__CONTEXT_FUNC_NAME)
-

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S Fri Jan 13 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Jump to a new context powerpc32 common.
-   Copyright (C) 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2008, 2009, 2011, 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
@@ -73,6 +73,7 @@
 
 #ifdef PIC
 	mflr    r8
+# define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
 	SETUP_GOT_ACCESS(r7,got_label)
 	addis	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
 	addi	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S Fri Jan 13 00:02:02 2012
@@ -1,5 +1,5 @@
 /* Save current context and jump to a new context.
-   Copyright (C) 2005, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2005,2006,2008,2009,2011,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
@@ -146,6 +146,7 @@
 
 # ifdef PIC
 	mflr    r8
+#  define got_label GENERATE_GOT_LABEL (__CONTEXT_FUNC_NAME)
 	SETUP_GOT_ACCESS(r7,got_label)
 	addis	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
 	addi	r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l

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