Messages in this thread Patch in this message | | | Date | Thu, 27 Jul 2000 10:37:05 -0400 (EDT) | From | Stephane Dalton <> | Subject | find_first_zero_bit problems... |
| |
I encountered the following problem with kernel 2.4-test4 on an dual Celeron machine
calling the find_first_zero_bit inline function works well inside a loop eg:
do { i = find_first_zero_bit(p, num_bits); if (i == num_bits) break; set_bit(i%32, p+(i/32)); }while(1);
but when manually unrolling the loop the function seems to be called only once...
I'm compiling with gcc-2.95.2 for Intel arch
the following patch fixes the problem, I'm unsure if it is the right way to go.
If there's any comment about this reply to me directly as I'm not on the list
thanks --- oldbitops.h Thu Jul 27 10:22:04 2000 +++ bitops.h Thu Jul 27 10:25:33 2000 @@ -134,7 +134,7 @@ if (!size) return 0; - __asm__ ("movl $-1,%%eax\n\t" + __asm__ __volatile__ ("movl $-1,%%eax\n\t" "xorl %%edx,%%edx\n\t" "repe; scasl\n\t" "je 1f\n\t" | |