Go to the documentation of this file. 1 #ifndef __ASM_SH_BITOPS_H
2 #define __ASM_SH_BITOPS_H
6 #ifndef _LINUX_BITOPS_H
7 #error only <linux/bitops.h> can be included directly
11 #include <asm/byteorder.h>
15 #elif defined(CONFIG_CPU_SH2A)
18 #elif defined(CONFIG_CPU_SH4A)
28 #define smp_mb__before_clear_bit() smp_mb()
29 #define smp_mb__after_clear_bit() smp_mb()
31 #ifdef CONFIG_SUPERH32
32 static inline unsigned long ffz(
unsigned long word)
40 :
"=r" (result),
"=r" (word)
41 :
"0" (~0L),
"1" (word)
52 static inline unsigned long __ffs(
unsigned long word)
60 :
"=r" (result),
"=r" (word)
61 :
"0" (~0L),
"1" (word)
66 static inline unsigned long ffz(
unsigned long word)
68 unsigned long result, __d2, __d3;
73 "beq %3, r63, tr0\n\t"
76 "shlri.l %1, 1, %1\n\t"
82 :
"=r" (result),
"=r" (word),
"=r" (__d2),
"=r" (__d3)
83 :
"0" (0L),
"1" (word));