1 #ifndef _ASM_WORD_AT_A_TIME_H
2 #define _ASM_WORD_AT_A_TIME_H
4 #include <asm/compiler.h>
7 * word-at-a-time interface for Alpha.
11 * We do not use the word_at_a_time struct on Alpha, but it needs to be
12 * implemented to humour the generic code.
14 struct word_at_a_time
{
15 const unsigned long unused
;
18 #define WORD_AT_A_TIME_CONSTANTS { 0 }
20 /* Return nonzero if val has a zero */
21 static inline unsigned long has_zero(unsigned long val
, unsigned long *bits
, const struct word_at_a_time
*c
)
23 unsigned long zero_locations
= __kernel_cmpbge(0, val
);
24 *bits
= zero_locations
;
25 return zero_locations
;
28 static inline unsigned long prep_zero_mask(unsigned long val
, unsigned long bits
, const struct word_at_a_time
*c
)
33 #define create_zero_mask(bits) (bits)
35 static inline unsigned long find_zero(unsigned long bits
)
37 #if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67)
38 /* Simple if have CIX instructions */
39 return __kernel_cttz(bits
);
41 unsigned long t1
, t2
, t3
;
42 /* Retain lowest set bit only */
44 /* Binary search for lowest set bit */
55 #endif /* _ASM_WORD_AT_A_TIME_H */