Lines Matching +full:0 +full:m

18  * is guaranteed to be atomic. All bit operations return 0 if the bit
19 * was cleared before the operation and != 0 if it was not.
25 * bit 0 is the LSB of addr; bit 64 is the LSB of (addr+1).
32 int *m = ((int *) addr) + (nr >> 5); in set_bit() local
35 "1: ldl_l %0,%3\n" in set_bit()
36 " bis %0,%2,%0\n" in set_bit()
37 " stl_c %0,%1\n" in set_bit()
38 " beq %0,2f\n" in set_bit()
42 :"=&r" (temp), "=m" (*m) in set_bit()
43 :"Ir" (1UL << (nr & 31)), "m" (*m)); in set_bit()
52 int *m = ((int *) addr) + (nr >> 5); in arch___set_bit() local
54 *m |= 1 << (nr & 31); in arch___set_bit()
61 int *m = ((int *) addr) + (nr >> 5); in clear_bit() local
64 "1: ldl_l %0,%3\n" in clear_bit()
65 " bic %0,%2,%0\n" in clear_bit()
66 " stl_c %0,%1\n" in clear_bit()
67 " beq %0,2f\n" in clear_bit()
71 :"=&r" (temp), "=m" (*m) in clear_bit()
72 :"Ir" (1UL << (nr & 31)), "m" (*m)); in clear_bit()
88 int *m = ((int *) addr) + (nr >> 5); in arch___clear_bit() local
90 *m &= ~(1 << (nr & 31)); in arch___clear_bit()
104 int *m = ((int *) addr) + (nr >> 5); in change_bit() local
107 "1: ldl_l %0,%3\n" in change_bit()
108 " xor %0,%2,%0\n" in change_bit()
109 " stl_c %0,%1\n" in change_bit()
110 " beq %0,2f\n" in change_bit()
114 :"=&r" (temp), "=m" (*m) in change_bit()
115 :"Ir" (1UL << (nr & 31)), "m" (*m)); in change_bit()
124 int *m = ((int *) addr) + (nr >> 5); in arch___change_bit() local
126 *m ^= 1 << (nr & 31); in arch___change_bit()
134 int *m = ((int *) addr) + (nr >> 5); in test_and_set_bit() local
140 "1: ldl_l %0,%4\n" in test_and_set_bit()
141 " and %0,%3,%2\n" in test_and_set_bit()
143 " xor %0,%3,%0\n" in test_and_set_bit()
144 " stl_c %0,%1\n" in test_and_set_bit()
145 " beq %0,3f\n" in test_and_set_bit()
153 :"=&r" (temp), "=m" (*m), "=&r" (oldbit) in test_and_set_bit()
154 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory"); in test_and_set_bit()
156 return oldbit != 0; in test_and_set_bit()
164 int *m = ((int *) addr) + (nr >> 5); in test_and_set_bit_lock() local
167 "1: ldl_l %0,%4\n" in test_and_set_bit_lock()
168 " and %0,%3,%2\n" in test_and_set_bit_lock()
170 " xor %0,%3,%0\n" in test_and_set_bit_lock()
171 " stl_c %0,%1\n" in test_and_set_bit_lock()
172 " beq %0,3f\n" in test_and_set_bit_lock()
180 :"=&r" (temp), "=m" (*m), "=&r" (oldbit) in test_and_set_bit_lock()
181 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory"); in test_and_set_bit_lock()
183 return oldbit != 0; in test_and_set_bit_lock()
192 unsigned long mask = 1 << (nr & 0x1f); in arch___test_and_set_bit()
193 int *m = ((int *) addr) + (nr >> 5); in arch___test_and_set_bit() local
194 int old = *m; in arch___test_and_set_bit()
196 *m = old | mask; in arch___test_and_set_bit()
197 return (old & mask) != 0; in arch___test_and_set_bit()
205 int *m = ((int *) addr) + (nr >> 5); in test_and_clear_bit() local
211 "1: ldl_l %0,%4\n" in test_and_clear_bit()
212 " and %0,%3,%2\n" in test_and_clear_bit()
214 " xor %0,%3,%0\n" in test_and_clear_bit()
215 " stl_c %0,%1\n" in test_and_clear_bit()
216 " beq %0,3f\n" in test_and_clear_bit()
224 :"=&r" (temp), "=m" (*m), "=&r" (oldbit) in test_and_clear_bit()
225 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory"); in test_and_clear_bit()
227 return oldbit != 0; in test_and_clear_bit()
236 unsigned long mask = 1 << (nr & 0x1f); in arch___test_and_clear_bit()
237 int *m = ((int *) addr) + (nr >> 5); in arch___test_and_clear_bit() local
238 int old = *m; in arch___test_and_clear_bit()
240 *m = old & ~mask; in arch___test_and_clear_bit()
241 return (old & mask) != 0; in arch___test_and_clear_bit()
249 int *m = ((int *) addr) + (nr >> 5); in test_and_change_bit() local
255 "1: ldl_l %0,%4\n" in test_and_change_bit()
256 " and %0,%3,%2\n" in test_and_change_bit()
257 " xor %0,%3,%0\n" in test_and_change_bit()
258 " stl_c %0,%1\n" in test_and_change_bit()
259 " beq %0,3f\n" in test_and_change_bit()
266 :"=&r" (temp), "=m" (*m), "=&r" (oldbit) in test_and_change_bit()
267 :"Ir" (1UL << (nr & 31)), "m" (*m) : "memory"); in test_and_change_bit()
269 return oldbit != 0; in test_and_change_bit()
278 unsigned long mask = 1 << (nr & 0x1f); in arch___test_and_change_bit()
279 int *m = ((int *) addr) + (nr >> 5); in arch___test_and_change_bit() local
280 int old = *m; in arch___test_and_change_bit()
282 *m = old ^ mask; in arch___test_and_change_bit()
283 return (old & mask) != 0; in arch___test_and_change_bit()
295 "1: ldl_l %0,%4\n" in xor_unlock_is_negative_byte()
296 " mov %0,%2\n" in xor_unlock_is_negative_byte()
297 " xor %0,%3,%0\n" in xor_unlock_is_negative_byte()
298 " stl_c %0,%1\n" in xor_unlock_is_negative_byte()
299 " beq %0,2f\n" in xor_unlock_is_negative_byte()
303 :"=&r" (temp), "=m" (*p), "=&r" (old) in xor_unlock_is_negative_byte()
304 :"Ir" (mask), "m" (*p)); in xor_unlock_is_negative_byte()
306 return (old & BIT(7)) != 0; in xor_unlock_is_negative_byte()
311 * so code should check against ~0UL first..
320 x = ~x & -~x; /* set first 0 bit, clear others */ in ffz_b()
321 x1 = x & 0xAA; in ffz_b()
322 x2 = x & 0xCC; in ffz_b()
323 x4 = x & 0xF0; in ffz_b()
324 sum = x2 ? 2 : 0; in ffz_b()
325 sum += (x4 != 0) * 4; in ffz_b()
326 sum += (x1 != 0); in ffz_b()
339 bits = __kernel_cmpbge(word, ~0UL); in ffz()
359 bits = __kernel_cmpbge(0, word); in __ffs()
379 return word ? result : 0; in ffs()
397 t = __kernel_cmpbge (x, 0x0101010101010101UL); in fls64()
400 r = a*8 + __flsm1_tab[t] + (x != 0); in fls64()
435 return __arch_hweight64(w & 0xffff); in __arch_hweight16()
440 return __arch_hweight64(w & 0xff); in __arch_hweight8()
462 b0 = b[0]; in sched_find_first_bit()
464 ofs = (b0 ? 0 : 64); in sched_find_first_bit()