Loading include/asm-x86/bitops.h +30 −32 Original line number Diff line number Diff line Loading @@ -62,9 +62,7 @@ static inline void set_bit(int nr, volatile void *addr) */ static inline void __set_bit(int nr, volatile void *addr) { asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); } /** Loading Loading @@ -297,12 +295,10 @@ static int test_bit(int nr, const volatile unsigned long *addr); #endif #define test_bit(nr, addr) \ (__builtin_constant_p(nr) ? \ constant_test_bit((nr),(addr)) : \ variable_test_bit((nr),(addr))) (__builtin_constant_p((nr)) \ ? constant_test_bit((nr), (addr)) \ : variable_test_bit((nr), (addr))) #undef BASE_ADDR #undef BIT_ADDR /** * __ffs - find first set bit in word * @word: The word to search Loading @@ -311,7 +307,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); */ static inline unsigned long __ffs(unsigned long word) { __asm__("bsf %1,%0" asm("bsf %1,%0" : "=r" (word) : "rm" (word)); return word; Loading @@ -325,7 +321,7 @@ static inline unsigned long __ffs(unsigned long word) */ static inline unsigned long ffz(unsigned long word) { __asm__("bsf %1,%0" asm("bsf %1,%0" : "=r" (word) : "r" (~word)); return word; Loading @@ -339,7 +335,7 @@ static inline unsigned long ffz(unsigned long word) */ static inline unsigned long __fls(unsigned long word) { __asm__("bsr %1,%0" asm("bsr %1,%0" : "=r" (word) : "rm" (word)); return word; Loading @@ -361,11 +357,11 @@ static inline int ffs(int x) { int r; #ifdef CONFIG_X86_CMOV __asm__("bsfl %1,%0\n\t" asm("bsfl %1,%0\n\t" "cmovzl %2,%0" : "=r" (r) : "rm" (x), "r" (-1)); #else __asm__("bsfl %1,%0\n\t" asm("bsfl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); Loading @@ -388,11 +384,11 @@ static inline int fls(int x) { int r; #ifdef CONFIG_X86_CMOV __asm__("bsrl %1,%0\n\t" asm("bsrl %1,%0\n\t" "cmovzl %2,%0" : "=&r" (r) : "rm" (x), "rm" (-1)); #else __asm__("bsrl %1,%0\n\t" asm("bsrl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); Loading @@ -401,6 +397,8 @@ static inline int fls(int x) } #endif /* __KERNEL__ */ #undef BASE_ADDR #undef BIT_ADDR #undef ADDR static inline void set_bit_string(unsigned long *bitmap, Loading Loading
include/asm-x86/bitops.h +30 −32 Original line number Diff line number Diff line Loading @@ -62,9 +62,7 @@ static inline void set_bit(int nr, volatile void *addr) */ static inline void __set_bit(int nr, volatile void *addr) { asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); } /** Loading Loading @@ -297,12 +295,10 @@ static int test_bit(int nr, const volatile unsigned long *addr); #endif #define test_bit(nr, addr) \ (__builtin_constant_p(nr) ? \ constant_test_bit((nr),(addr)) : \ variable_test_bit((nr),(addr))) (__builtin_constant_p((nr)) \ ? constant_test_bit((nr), (addr)) \ : variable_test_bit((nr), (addr))) #undef BASE_ADDR #undef BIT_ADDR /** * __ffs - find first set bit in word * @word: The word to search Loading @@ -311,7 +307,7 @@ static int test_bit(int nr, const volatile unsigned long *addr); */ static inline unsigned long __ffs(unsigned long word) { __asm__("bsf %1,%0" asm("bsf %1,%0" : "=r" (word) : "rm" (word)); return word; Loading @@ -325,7 +321,7 @@ static inline unsigned long __ffs(unsigned long word) */ static inline unsigned long ffz(unsigned long word) { __asm__("bsf %1,%0" asm("bsf %1,%0" : "=r" (word) : "r" (~word)); return word; Loading @@ -339,7 +335,7 @@ static inline unsigned long ffz(unsigned long word) */ static inline unsigned long __fls(unsigned long word) { __asm__("bsr %1,%0" asm("bsr %1,%0" : "=r" (word) : "rm" (word)); return word; Loading @@ -361,11 +357,11 @@ static inline int ffs(int x) { int r; #ifdef CONFIG_X86_CMOV __asm__("bsfl %1,%0\n\t" asm("bsfl %1,%0\n\t" "cmovzl %2,%0" : "=r" (r) : "rm" (x), "r" (-1)); #else __asm__("bsfl %1,%0\n\t" asm("bsfl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); Loading @@ -388,11 +384,11 @@ static inline int fls(int x) { int r; #ifdef CONFIG_X86_CMOV __asm__("bsrl %1,%0\n\t" asm("bsrl %1,%0\n\t" "cmovzl %2,%0" : "=&r" (r) : "rm" (x), "rm" (-1)); #else __asm__("bsrl %1,%0\n\t" asm("bsrl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); Loading @@ -401,6 +397,8 @@ static inline int fls(int x) } #endif /* __KERNEL__ */ #undef BASE_ADDR #undef BIT_ADDR #undef ADDR static inline void set_bit_string(unsigned long *bitmap, Loading