Messages in this thread | | | Date | Thu, 6 May 2004 14:24:54 +0100 | From | Russell King <> | Subject | Re: [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/
| |