diff options
author | Ralph Giles <giles@thaumas.net> | 2011-10-28 22:32:44 +0400 |
---|---|---|
committer | Ralph Giles <giles@thaumas.net> | 2011-10-28 22:37:18 +0400 |
commit | 9e19fe6ffb69e990442a197a97394c0232768f82 (patch) | |
tree | fbc3aef5e2c13d3b6a4999ea61a56d79617ceafa /celt/ecintrin.h | |
parent | 7931a6013587160a6f83f044677dfc08671bff65 (diff) |
Use the fallback __GNUC_PREREQ from arch.h in ecintrin.h.
__GNUC_PREREQ is generally defined by glibc; ecintrin.h
was checking to see if it was defined before use for
portability to non-glibc systems. However, we now have
a fallback definition in arch.h.
Diffstat (limited to 'celt/ecintrin.h')
-rw-r--r-- | celt/ecintrin.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/celt/ecintrin.h b/celt/ecintrin.h index be229470..8f501c21 100644 --- a/celt/ecintrin.h +++ b/celt/ecintrin.h @@ -29,6 +29,7 @@ #include "opus_types.h" #include <math.h> #include <limits.h> +#include "arch.h" #if !defined(_ecintrin_H) # define _ecintrin_H (1) @@ -78,15 +79,13 @@ static __inline int ec_bsr(unsigned long _x){ # include "dsplib.h" # define EC_CLZ0 (31) # define EC_CLZ(_x) (_lnorm(_x)) -#elif defined(__GNUC_PREREQ) -# if __GNUC_PREREQ(3,4) -# if INT_MAX>=2147483647 -# define EC_CLZ0 ((int)sizeof(unsigned)*CHAR_BIT) -# define EC_CLZ(_x) (__builtin_clz(_x)) -# elif LONG_MAX>=2147483647L -# define EC_CLZ0 ((int)sizeof(unsigned long)*CHAR_BIT) -# define EC_CLZ(_x) (__builtin_clzl(_x)) -# endif +#elif __GNUC_PREREQ(3,4) +# if INT_MAX>=2147483647 +# define EC_CLZ0 ((int)sizeof(unsigned)*CHAR_BIT) +# define EC_CLZ(_x) (__builtin_clz(_x)) +# elif LONG_MAX>=2147483647L +# define EC_CLZ0 ((int)sizeof(unsigned long)*CHAR_BIT) +# define EC_CLZ(_x) (__builtin_clzl(_x)) # endif #endif |