Add __glibc_likely as an alias for __builtin_expect when available

This commit is contained in:
Siddhesh Poyarekar 2012-12-28 11:53:01 +05:30
parent 99136f8202
commit 91998e449e
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2012-12-28 Siddhesh Poyarekar <siddhesh@redhat.com>
* misc/sys/cdefs.h(__glibc_likely): Wrap __builtin_expect for
TRUE case.
* sysdeps/ieee754/dbl-64/mpa.c (norm): Define R as RADIXI.
(norm): Likewise.
* sysdeps/ieee754/dbl-64/mpa2.h: Remove all static const

View File

@ -378,8 +378,10 @@
#if __GNUC__ >= 3
# define __glibc_unlikely(cond) __builtin_expect((cond), 0)
# define __glibc_likely(cond) __builtin_expect((cond), 1)
#else
# define __glibc_unlikely(cond) (cond)
# define __glibc_likely(cond) (cond)
#endif
#include <bits/wordsize.h>