about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_scalbn.c
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/dbl-64/s_scalbn.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_scalbn.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_scalbn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_scalbn.c b/sysdeps/ieee754/dbl-64/s_scalbn.c
index 6e7d5ad217..0f58034df5 100644
--- a/sysdeps/ieee754/dbl-64/s_scalbn.c
+++ b/sysdeps/ieee754/dbl-64/s_scalbn.c
@@ -31,7 +31,7 @@ __scalbn (double x, int n)
   int32_t k, hx, lx;
   EXTRACT_WORDS (hx, lx, x);
   k = (hx & 0x7ff00000) >> 20;                  /* extract exponent */
-  if (__builtin_expect (k == 0, 0))             /* 0 or subnormal x */
+  if (__glibc_unlikely (k == 0))                   /* 0 or subnormal x */
     {
       if ((lx | (hx & 0x7fffffff)) == 0)
 	return x;                                  /* +-0 */
@@ -39,16 +39,16 @@ __scalbn (double x, int n)
       GET_HIGH_WORD (hx, x);
       k = ((hx & 0x7ff00000) >> 20) - 54;
     }
-  if (__builtin_expect (k == 0x7ff, 0))
+  if (__glibc_unlikely (k == 0x7ff))
     return x + x;                                       /* NaN or Inf */
-  if (__builtin_expect (n < -50000, 0))
+  if (__glibc_unlikely (n < -50000))
     return tiny * __copysign (tiny, x);   /*underflow*/
-  if (__builtin_expect (n > 50000 || k + n > 0x7fe, 0))
+  if (__glibc_unlikely (n > 50000 || k + n > 0x7fe))
     return huge * __copysign (huge, x);   /* overflow  */
   /* Now k and n are bounded we know that k = k+n does not
      overflow.  */
   k = k + n;
-  if (__builtin_expect (k > 0, 1))              /* normal result */
+  if (__glibc_likely (k > 0))                    /* normal result */
     {
       SET_HIGH_WORD (x, (hx & 0x800fffff) | (k << 20)); return x;
     }