Go to the documentation of this file. 1 #ifndef _PARISC_BITOPS_H
2 #define _PARISC_BITOPS_H
4 #ifndef _LINUX_BITOPS_H
5 #error only <linux/bitops.h> can be included directly
8 #include <linux/compiler.h>
10 #include <asm/byteorder.h>
19 #define CHOP_SHIFTCOUNT(x) (((unsigned long) (x)) & (BITS_PER_LONG - 1))
22 #define smp_mb__before_clear_bit() smp_mb()
23 #define smp_mb__after_clear_bit() smp_mb()
74 set = (old &
mask) ? 1 : 0;
92 set = (old &
mask) ? 1 : 0;
103 unsigned long oldbit;
109 *addr = oldbit ^
mask;
112 return (oldbit & mask) ? 1 : 0;
145 " extrd,u,*<> %0,63,32,%%r0\n"
146 " extrd,u,*TR %0,31,32,%0\n"
151 " extru,<> %0,31,16,%%r0\n"
152 " extru,TR %0,15,16,%0\n"
154 " extru,<> %0,31,8,%%r0\n"
155 " extru,TR %0,23,8,%0\n"
157 " extru,<> %0,31,4,%%r0\n"
158 " extru,TR %0,27,4,%0\n"
160 " extru,<> %0,31,2,%%r0\n"
161 " extru,TR %0,29,2,%0\n"
163 " extru,= %0,31,1,%%r0\n"
165 :
"+r" (x),
"=r" (ret) );
178 return x ? (
__ffs((
unsigned long)x) + 1) : 0;
194 " extru,<> %0,15,16,%%r0\n"
195 " zdep,TR %0,15,16,%0\n"
197 " extru,<> %0,7,8,%%r0\n"
198 " zdep,TR %0,23,24,%0\n"
200 " extru,<> %0,3,4,%%r0\n"
201 " zdep,TR %0,27,28,%0\n"
203 " extru,<> %0,1,2,%%r0\n"
204 " zdep,TR %0,29,30,%0\n"
206 " extru,= %0,0,1,%%r0\n"
208 :
"+r" (x),
"=r" (ret) );