lkml.org 
[lkml]   [2004]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] get rid of "+m" constraint in i386 rwsems
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.078 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site