From: Jeff Dike <jdike@addtoit.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Dan Kegel <dank@kegel.com>,
linux-kernel@vger.kernel.org, Robert Walsh <rjwalsh@durables.org>
Subject: Re: Valgrinding the kernel?
Date: Fri, 6 Jul 2007 17:09:58 -0400 [thread overview]
Message-ID: <20070706210958.GA13291@c2.user-mode-linux.org> (raw)
In-Reply-To: <468E9D3F.4030406@goop.org>
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
next prev parent reply other threads:[~2007-07-06 21:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 4:14 Valgrinding the kernel? Dan Kegel
2007-07-06 5:44 ` Jeremy Fitzhardinge
2007-07-06 17:25 ` Jeff Dike
2007-07-06 17:30 ` Dan Kegel
2007-07-06 19:42 ` Jeff Dike
2007-07-06 19:51 ` Jeremy Fitzhardinge
2007-07-06 21:09 ` Jeff Dike [this message]
2007-07-06 18:00 ` Jeremy Fitzhardinge
2007-07-06 19:04 ` Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070706210958.GA13291@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=dank@kegel.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjwalsh@durables.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox