Messages in this thread | | | Date | Fri, 6 Jul 2007 17:09:58 -0400 | From | Jeff Dike <> | Subject | Re: Valgrinding the kernel? |
| |
On Fri, Jul 06, 2007 at 12:51:27PM -0700, Jeremy Fitzhardinge wrote: > The virtual CPU code has been competely rewritten since then. If its a > non-gcc generated instruction, its possible the new code > parser/generator hasn't been taught to deal with it.
It's not from gcc - it's from the i386 bitops.h:
static inline int find_first_zero_bit(const unsigned long *addr, unsigned size) { int d0, d1, d2; int res;
if (!size) return 0; /* This looks at memory. Mark it volatile to tell gcc not to move it around */ __asm__ __volatile__( "movl $-1,%%eax\n\t" "xorl %%edx,%%edx\n\t" "repe; scasl\n\t" "je 1f\n\t" "xorl -4(%%edi),%%eax\n\t" "subl $4,%%edi\n\t" "bsfl %%eax,%%edx\n" "1:\tsubl %%ebx,%%edi\n\t" "shll $3,%%edi\n\t" "addl %%edi,%%edx" :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); return res; }
Jeff
-- Work email - jdike at linux dot intel dot com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |