about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /sysdeps/ieee754/ldbl-128ibm
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_fmodl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/math_ldbl.h6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_llrintl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_llroundl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_logbl.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_lrintl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_lroundl.c6
7 files changed, 19 insertions, 19 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c b/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
index a140fb322d..205097d38f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
@@ -48,7 +48,7 @@ __ieee754_fmodl (long double x, long double y)
 			    (hx>=0x7ff0000000000000LL)|| /* y=0,or x not finite */
 			    (hy>0x7ff0000000000000LL),0))	/* or y is NaN */
 	    return (x*y)/(x*y);
-	if (__builtin_expect (hx <= hy, 0))
+	if (__glibc_unlikely (hx <= hy))
 	  {
 	    /* If |x| < |y| return x.  */
 	    if (hx < hy)
@@ -83,7 +83,7 @@ __ieee754_fmodl (long double x, long double y)
 	ldbl_extract_mantissa(&hx, &lx, &ix, x);
 	ldbl_extract_mantissa(&hy, &ly, &iy, y);
 
-	if (__builtin_expect (ix == -IEEE754_DOUBLE_BIAS, 0))
+	if (__glibc_unlikely (ix == -IEEE754_DOUBLE_BIAS))
 	  {
 	    /* subnormal x, shift x to normal.  */
 	    while ((hx & (1LL << 48)) == 0)
@@ -94,7 +94,7 @@ __ieee754_fmodl (long double x, long double y)
 	      }
 	  }
 
-	if (__builtin_expect (iy == -IEEE754_DOUBLE_BIAS, 0))
+	if (__glibc_unlikely (iy == -IEEE754_DOUBLE_BIAS))
 	  {
 	    /* subnormal y, shift y to normal.  */
 	    while ((hy & (1LL << 48)) == 0)
diff --git a/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h b/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
index 1b6e27a9ff..051352f9f7 100644
--- a/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
+++ b/sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
@@ -215,14 +215,14 @@ ldbl_nearbyint (double a)
 {
   double two52 = 0x1p52;
 
-  if (__builtin_expect ((__builtin_fabs (a) < two52), 1))
+  if (__glibc_likely ((__builtin_fabs (a) < two52)))
     {
-      if (__builtin_expect ((a > 0.0), 1))
+      if (__glibc_likely ((a > 0.0)))
 	{
 	  a += two52;
 	  a -= two52;
 	}
-      else if (__builtin_expect ((a < 0.0), 1))
+      else if (__glibc_likely ((a < 0.0)))
 	{
 	  a = two52 - a;
 	  a = -(a - two52);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c b/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
index 345f3905d6..86996bff3d 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_llrintl.c
@@ -45,7 +45,7 @@ __llrintl (long double x)
     {
       save_round = __fegetround ();
 
-      if (__builtin_expect ((xh == -(double) (-__LONG_LONG_MAX__ - 1)), 0))
+      if (__glibc_unlikely ((xh == -(double) (-__LONG_LONG_MAX__ - 1))))
 	{
 	  /* When XH is 9223372036854775808.0, converting to long long will
 	     overflow, resulting in an invalid operation.  However, XL might
@@ -72,7 +72,7 @@ __llrintl (long double x)
       res = hi + lo;
 
       /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi).  */
-      if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ lo) & (res ^ hi)) < 0)))
 	goto overflow;
 
       xh -= lo;
@@ -114,7 +114,7 @@ __llrintl (long double x)
 	  break;
 	}
 
-      if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ (res - hi)) & (res ^ hi)) < 0)))
 	goto overflow;
 
       return res;
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c b/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
index 4a6e2d5f83..dd84074cf7 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_llroundl.c
@@ -41,7 +41,7 @@ __llroundl (long double x)
 #endif
     )
     {
-      if (__builtin_expect ((xh == -(double) (-__LONG_LONG_MAX__ - 1)), 0))
+      if (__glibc_unlikely ((xh == -(double) (-__LONG_LONG_MAX__ - 1))))
 	{
 	  /* When XH is 9223372036854775808.0, converting to long long will
 	     overflow, resulting in an invalid operation.  However, XL might
@@ -68,7 +68,7 @@ __llroundl (long double x)
       res = hi + lo;
 
       /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi).  */
-      if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ lo) & (res ^ hi)) < 0)))
 	goto overflow;
 
       xh -= lo;
@@ -94,7 +94,7 @@ __llroundl (long double x)
 	    res -= 1;
 	}
 
-      if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ (res - hi)) & (res ^ hi)) < 0)))
 	goto overflow;
 
       return res;
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_logbl.c b/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
index da8d71bdec..dbd3478e63 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_logbl.c
@@ -36,7 +36,7 @@ __logbl (long double x)
     return -1.0 / fabs (x);
   if (hx >= 0x7ff0000000000000LL)
     return x * x;
-  if (__builtin_expect ((rhx = hx >> 52) == 0, 0))
+  if (__glibc_unlikely ((rhx = hx >> 52) == 0))
     {
       /* POSIX specifies that denormal number is treated as
          though it were normalized.  */
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c b/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
index 56c3a81cd3..2b47c52a06 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_lrintl.c
@@ -59,7 +59,7 @@ __lrintl (long double x)
 	hi = llhi;
       xh -= hi;
 #else
-      if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0))
+      if (__glibc_unlikely ((xh == -(double) (-__LONG_MAX__ - 1))))
 	{
 	  /* When XH is 9223372036854775808.0, converting to long long will
 	     overflow, resulting in an invalid operation.  However, XL might
@@ -87,7 +87,7 @@ __lrintl (long double x)
       res = hi + lo;
 
       /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi).  */
-      if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ lo) & (res ^ hi)) < 0)))
 	goto overflow;
 
       xh -= lo;
@@ -129,7 +129,7 @@ __lrintl (long double x)
 	  break;
 	}
 
-      if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ (res - hi)) & (res ^ hi)) < 0)))
 	goto overflow;
 
       return res;
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c b/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
index 107778df3e..27b72e2ad1 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_lroundl.c
@@ -55,7 +55,7 @@ __lroundl (long double x)
 	hi = llhi;
       xh -= hi;
 #else
-      if (__builtin_expect ((xh == -(double) (-__LONG_MAX__ - 1)), 0))
+      if (__glibc_unlikely ((xh == -(double) (-__LONG_MAX__ - 1))))
 	{
 	  /* When XH is 9223372036854775808.0, converting to long long will
 	     overflow, resulting in an invalid operation.  However, XL might
@@ -83,7 +83,7 @@ __lroundl (long double x)
       res = hi + lo;
 
       /* This is just sign(hi) == sign(lo) && sign(res) != sign(hi).  */
-      if (__builtin_expect (((~(hi ^ lo) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ lo) & (res ^ hi)) < 0)))
 	goto overflow;
 
       xh -= lo;
@@ -109,7 +109,7 @@ __lroundl (long double x)
 	    res -= 1;
 	}
 
-      if (__builtin_expect (((~(hi ^ (res - hi)) & (res ^ hi)) < 0), 0))
+      if (__glibc_unlikely (((~(hi ^ (res - hi)) & (res ^ hi)) < 0)))
 	goto overflow;
 
       return res;