mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	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 15:08:11 -0800	[thread overview]
Message-ID: <20061130150811.0a7851b0.randy.dunlap@oracle.com> (raw)
In-Reply-To: <200611302349.12261.ak@suse.de>

On Thu, 30 Nov 2006 23:49:12 +0100 Andi Kleen wrote:

> 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.

e.g. (may be ix86 instead of x86_64):

http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Constraints.html#Constraints

http://www-128.ibm.com/developerworks/linux/library/l-ia.html

http://www.uwsg.indiana.edu/hypermail/linux/kernel/9804.2/0953.html

---
~Randy

      reply	other threads:[~2006-11-30 23:08 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
2006-11-30 23:08         ` Randy Dunlap [this message]

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=20061130150811.0a7851b0.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=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®