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.14-403-g8ec250a


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  8ec250a48425e8640fc01504bc1a42b63467768e (commit)
      from  1a97a8c78f9b99d835581f14fc6beb57cb93e97a (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=8ec250a48425e8640fc01504bc1a42b63467768e

commit 8ec250a48425e8640fc01504bc1a42b63467768e
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Fri Oct 21 12:28:42 2011 -0400

    Add some __builtin_expect to generic __ieee754_log

diff --git a/ChangeLog b/ChangeLog
index b2d629b..404e1fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-21  Ulrich Drepper  <drepper@gmail.com>
+
+	* sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Add a few more
+	__builtin_expect.
+
 2011-10-20  Ulrich Drepper  <drepper@gmail.com>
 
 	* sysdeps/i386/configure.in: Test for -mfma4 option.
diff --git a/sysdeps/ieee754/dbl-64/e_log.c b/sysdeps/ieee754/dbl-64/e_log.c
index 5d320db..0fc6f92 100644
--- a/sysdeps/ieee754/dbl-64/e_log.c
+++ b/sysdeps/ieee754/dbl-64/e_log.c
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
  *
  * 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
@@ -68,7 +68,7 @@ double __ieee754_log(double x) {
 
   num.d = x;  ux = num.i[HIGH_HALF];  dx = num.i[LOW_HALF];
   n=0;
-  if (ux < 0x00100000) {
+  if (__builtin_expect(ux < 0x00100000, 0)) {
     if (__builtin_expect(((ux & 0x7fffffff) | dx) == 0, 0))
       return MHALF/ZERO; /* return -INF */
     if (__builtin_expect(ux < 0, 0))
@@ -82,7 +82,7 @@ double __ieee754_log(double x) {
   /* Regular values of x */
 
   w = x-ONE;
-  if (ABS(w) > U03) { goto case_03; }
+  if (__builtin_expect(ABS(w) > U03, 1)) { goto case_03; }
 
 
   /*--- Stage I, the case abs(x-1) < 0.03 */

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

Summary of changes:
 ChangeLog                      |    5 +++++
 sysdeps/ieee754/dbl-64/e_log.c |    6 +++---
 2 files changed, 8 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]