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]

GNU C Library master sources branch, master, updated. glibc-2.15-77-gd6e97a1


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 "GNU C Library master sources".

The branch, master has been updated
       via  d6e97a1da05c1be8ac4cc2f735a98181c457d90b (commit)
      from  e5f484c622fa0163379b7e577d5b289f0a0b49e7 (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.git;a=commitdiff;h=d6e97a1da05c1be8ac4cc2f735a98181c457d90b

commit d6e97a1da05c1be8ac4cc2f735a98181c457d90b
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 9 18:59:04 2012 -0500

    Some branch prediction for log1p

diff --git a/ChangeLog b/ChangeLog
index 2035826..07fd067 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-09  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/ieee754/dbl-64/s_log1p.c (__log1p): Add branch prediction.
+
 2012-01-08  Ulrich Drepper  <drepper@gmail.com>
 
 	* io/bits/poll2.h: Add __BEGIN/__END_DECLS.
diff --git a/sysdeps/ieee754/dbl-64/s_log1p.c b/sysdeps/ieee754/dbl-64/s_log1p.c
index dc79a02..f82048f 100644
--- a/sysdeps/ieee754/dbl-64/s_log1p.c
+++ b/sysdeps/ieee754/dbl-64/s_log1p.c
@@ -106,11 +106,11 @@ __log1p(double x)
 
 	k = 1;
 	if (hx < 0x3FDA827A) {			/* x < 0.41422  */
-	    if(ax>=0x3ff00000) {		/* x <= -1.0 */
+	    if(__builtin_expect(ax>=0x3ff00000, 0)) { /* x <= -1.0 */
 		if(x==-1.0) return -two54/(x-x);/* log1p(-1)=+inf */
 		else return (x-x)/(x-x);	/* log1p(x<-1)=NaN */
 	    }
-	    if(ax<0x3e200000) {			/* |x| < 2**-29 */
+	    if(__builtin_expect(ax<0x3e200000, 0)) { /* |x| < 2**-29 */
 		math_force_eval(two54+x);	/* raise inexact */
 		if (ax<0x3c900000)		/* |x| < 2**-54 */
 		    return x;
@@ -120,7 +120,7 @@ __log1p(double x)
 	    if(hx>0||hx<=((int32_t)0xbfd2bec3)) {
 		k=0;f=x;hu=1;}	/* -0.2929<x<0.41422 */
 	}
-	if (hx >= 0x7ff00000) return x+x;
+	else if (__builtin_expect(hx >= 0x7ff00000, 0)) return x+x;
 	if(k!=0) {
 	    if(hx<0x43400000) {
 		u  = 1.0+x;

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

Summary of changes:
 ChangeLog                        |    4 ++++
 sysdeps/ieee754/dbl-64/s_log1p.c |    6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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