All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: David Howells <dhowells@redhat.com>, Richard Henderson <rth@twiddle.net>
Cc: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] get rid of "+m" constraint in i386 rwsems
Date: Thu, 6 May 2004 14:24:54 +0100	[thread overview]
Message-ID: <20040506142454.C29621@flint.arm.linux.org.uk> (raw)
In-Reply-To: <5170.1083848296@redhat.com>; from dhowells@redhat.com on Thu, May 06, 2004 at 01:58:16PM +0100

On Thu, May 06, 2004 at 01:58:16PM +0100, David Howells wrote:
> > Can you explain the need for the change?
> 
> gcc-3.4 generates warnings about it:
> 
> include/asm/rwsem.h: In function `avc_audit':
> include/asm/rwsem.h:126: warning: read-write constraint does not allow a register
> include/asm/rwsem.h:126: warning: read-write constraint does not allow a register
> 
> The gcc people (or at least one of them) seem to think that these warnings are
> correct on a "+m" constraint. See:
> 
> 	http://marc.theaimsgroup.com/?l=linux-kernel&m=107475162200773&w=2
> 
> I understood "+m" to be a shorthand way of specifying "=m" and "m" on the same
> bit of memory, but apparently it that's not what it means.

After reading Richard's post, I wonder if, in the case of:

	"=m" (x) : "m" (x)

whether assembly should assume that %0 is the same as %1.  Do they
just happen to be the same thing?  I'm thinking of the case where
there may be two different ways GCC may reference the same memory
location.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

  reply	other threads:[~2004-05-06 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06 11:58 [PATCH] get rid of "+m" constraint in i386 rwsems David Howells
2004-05-06 12:18 ` Russell King
2004-05-06 12:58   ` David Howells
2004-05-06 13:24     ` Russell King [this message]
2004-05-06 19:23       ` Horst von Brand
2004-05-06 14:42 ` Linus Torvalds
2004-05-06 23:45   ` Richard Henderson

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=20040506142454.C29621@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@osdl.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.