Commit cbc319f3 authored by Richard Henderson's avatar Richard Henderson

[ALPHA] Use "long" on some internal bitops routines.

parent 6eaf42d9
...@@ -324,7 +324,7 @@ static inline int fls(int word) ...@@ -324,7 +324,7 @@ static inline int fls(int word)
#endif #endif
/* Compute powers of two for the given integer. */ /* Compute powers of two for the given integer. */
static inline int floor_log2(unsigned long word) static inline long floor_log2(unsigned long word)
{ {
#if defined(__alpha_cix__) && defined(__alpha_fix__) #if defined(__alpha_cix__) && defined(__alpha_fix__)
return 63 - __kernel_ctlz(word); return 63 - __kernel_ctlz(word);
...@@ -336,7 +336,7 @@ static inline int floor_log2(unsigned long word) ...@@ -336,7 +336,7 @@ static inline int floor_log2(unsigned long word)
#endif #endif
} }
static inline int ceil_log2(unsigned int word) static inline long ceil_log2(unsigned long word)
{ {
long bit = floor_log2(word); long bit = floor_log2(word);
return bit + (word > (1UL << bit)); return bit + (word > (1UL << bit));
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
# define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift)
# define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift)
# define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b)
# define __kernel_cttz(x) __builtin_ctz(x) # define __kernel_cttz(x) __builtin_ctzl(x)
# define __kernel_ctlz(x) __builtin_clz(x) # define __kernel_ctlz(x) __builtin_clzl(x)
# define __kernel_ctpop(x) __builtin_popcount(x) # define __kernel_ctpop(x) __builtin_popcountl(x)
#else #else
# define __kernel_insbl(val, shift) \ # define __kernel_insbl(val, shift) \
({ unsigned long __kir; \ ({ unsigned long __kir; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment