Add likely/unlikely macros
Jeffrey Pfau jeffrey@endrift.com
Wed, 22 Oct 2014 22:39:36 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/arm/macros.h
→
src/arm/macros.h
@@ -61,4 +61,7 @@ return INS_BITS(src, (START), (START) + (SIZE), bits); \
} #define DECL_BIT(TYPE, FIELD, BIT) DECL_BITS(TYPE, FIELD, BIT, 1) + +#define LIKELY(X) __builtin_expect(!!(X), 1) +#define UNLIKELY(X) __builtin_expect(!!(X), 0) #endif