Use __builtin_clzll on int64 in __logb

This commit is contained in:
H.J. Lu 2012-05-14 05:04:11 -07:00
parent 2523c62bec
commit c044d724dc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c (__logb): Replace
__builtin_clzl with __builtin_clzll.
2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14104]

View File

@ -36,7 +36,7 @@ __logb (double x)
return x * x;
if (__builtin_expect (ex == 0, 0))
{
int m = (ix == 0) ? 0 : __builtin_clzl (ix);
int m = (ix == 0) ? 0 : __builtin_clzll (ix);
return -1022.0 + (double)(11 -m);
}
return (double) (ex - 1023);