All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [patch] [sched] bitmap cleanup, speedup, 2.5.3-pre5
Date: 28 Jan 2002 07:46:19 -0800	[thread overview]
Message-ID: <a33rob$26r$1@nell.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0201281744070.9796-100000@localhost.localdomain>

Followup to:  <Pine.LNX.4.33.0201281744070.9796-100000@localhost.localdomain>
By author:    Ingo Molnar <mingo@elte.hu>
In newsgroup: linux.dev.kernel
> 
> +static __inline__ unsigned long __ffs(unsigned long word)
> +{
> +	__asm__("bsfl %1,%0"
> +		:"=r" (word)
> +		:"r" (word));
>  	return word;
>  }
> 

Should typically be:

static __inline__ unsigned long __ffs(unsigned long word)
{
	__asm__("bsfl %1,%0"
		:"=r" (word)
		:"rm" (word));
 	return word;
 }

There is no reason to force the compiler to put the operand in a
register.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  reply	other threads:[~2002-01-28 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-28 16:50 [patch] [sched] bitmap cleanup, speedup, 2.5.3-pre5 Ingo Molnar
2002-01-28 15:46 ` H. Peter Anvin [this message]
     [not found] <200201281546.HAA02275@nell.transmeta.com>
2002-01-28 17:53 ` Ingo Molnar

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='a33rob$26r$1@nell.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.