[lkml]   [2007]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 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;


    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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-07-06 23:13    [W:0.020 / U:50.640 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site