mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: bugme-daemon@bugzilla.kernel.org, linux-kernel@vger.kernel.org,
	mjw99@ic.ac.uk
Subject: Re: [Bugme-new] [Bug 7602] New: Failure on compilation: include/asm/bitops.h:122: error: inconsistent operand constraints in an `asm' in nfs_access_add_cache()
Date: Thu, 30 Nov 2006 23:49:12 +0100	[thread overview]
Message-ID: <200611302349.12261.ak@suse.de> (raw)
In-Reply-To: <20061130143246.4a4bb970.akpm@osdl.org>

On Thursday 30 November 2006 23:32, Andrew Morton wrote:
> On Thu, 30 Nov 2006 23:22:00 +0100
> Andi Kleen <ak@suse.de> wrote:
> 
> > > 
> > > static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
> > > {
> > > 	int oldbit;
> > > 
> > > 	__asm__(
> > > 		"btsl %2,%1\n\tsbbl %0,%0"
> > > 		:"=r" (oldbit),"+m" (ADDR)
> > > 		:"dIr" (nr));
> > > 	return oldbit;
> > > }
> > > 
> > > explodes with gcc-3.4.4.
> > 
> > Known issue.  The new form is correct and needed, but the old gcc doesn't accept
> > it. I haven't gotten a form that is both and correct and works on the old compiler
> > out of the gcc hackers I asked.
> 
> Oh, thanks.
> 
> What does "d" do, btw?  My gcc info page only covers "x86" and says only "`d' register"

Hmm, normally edx (aka Extended D register eXtended :) or rdx 

But you're right it doesn't make sense here because 'd' is already included in 'r'.
Probably should be dropped.

> 
> (And, more importantly, where is the best description of gcc asm constraints?)

Either info pages or gcc source. There was also a web page somewhere with a tutorial,
but i don't think it was a full reference.

-Andi

  reply	other threads:[~2006-11-30 22:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200611302118.kAULIrxS011661@fire-2.osdl.org>
2006-11-30 21:37 ` Andrew Morton
2006-11-30 22:22   ` Andi Kleen
2006-11-30 22:32     ` Andrew Morton
2006-11-30 22:49       ` Andi Kleen [this message]
2006-11-30 23:08         ` Randy Dunlap

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=200611302349.12261.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjw99@ic.ac.uk \
    /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

all inboxes | Powered by JetHome®