LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH][2.6.7-rc2] gcc-3.4.0 warning in i386 __down_read_trylock()
@ 2004-05-30 10:47 Mikael Pettersson
2004-05-30 17:22 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2004-05-30 10:47 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
The i386 __down_read_trylock() code contains a "+m" asm
constraint, which triggers warnings from gcc-3.4.0:
gcc -Wp,-MD,fs/xfs/.xfs_iget.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=k8 -Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer -Wdeclaration-after-statement -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char -DKBUILD_BASENAME=xfs_iget -DKBUILD_MODNAME=xfs -c -o fs/xfs/xfs_iget.o fs/xfs/xfs_iget.c
include/asm/rwsem.h: In function `xfs_ilock_nowait':
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
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
Fixed by the patch below.
/Mikael
diff -ruN linux-2.6.7-rc2/include/asm-i386/rwsem.h linux-2.6.7-rc2.gcc340-fixes/include/asm-i386/rwsem.h
--- linux-2.6.7-rc2/include/asm-i386/rwsem.h 2003-03-08 17:22:32.000000000 +0100
+++ linux-2.6.7-rc2.gcc340-fixes/include/asm-i386/rwsem.h 2004-05-30 11:39:07.000000000 +0200
@@ -134,8 +134,8 @@
" jnz 1b\n\t"
"2:\n\t"
"# ending __down_read_trylock\n\t"
- : "+m"(sem->count), "=&a"(result), "=&r"(tmp)
- : "i"(RWSEM_ACTIVE_READ_BIAS)
+ : "=m"(sem->count), "=&a"(result), "=&r"(tmp)
+ : "i"(RWSEM_ACTIVE_READ_BIAS), "m"(sem->count)
: "memory", "cc");
return result>=0 ? 1 : 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][2.6.7-rc2] gcc-3.4.0 warning in i386 __down_read_trylock()
2004-05-30 10:47 [PATCH][2.6.7-rc2] gcc-3.4.0 warning in i386 __down_read_trylock() Mikael Pettersson
@ 2004-05-30 17:22 ` Linus Torvalds
2004-06-01 14:19 ` Mikael Pettersson
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2004-05-30 17:22 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel
On Sun, 30 May 2004, Mikael Pettersson wrote:
>
> The i386 __down_read_trylock() code contains a "+m" asm
> constraint, which triggers warnings from gcc-3.4.0:
This comes up every once in a while.
It's going to be fixed in 3.4.1, and the 3.4.0 warning is just bogus.
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][2.6.7-rc2] gcc-3.4.0 warning in i386 __down_read_trylock()
2004-05-30 17:22 ` Linus Torvalds
@ 2004-06-01 14:19 ` Mikael Pettersson
0 siblings, 0 replies; 3+ messages in thread
From: Mikael Pettersson @ 2004-06-01 14:19 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
Linus Torvalds writes:
>
>
> On Sun, 30 May 2004, Mikael Pettersson wrote:
> >
> > The i386 __down_read_trylock() code contains a "+m" asm
> > constraint, which triggers warnings from gcc-3.4.0:
>
> This comes up every once in a while.
>
> It's going to be fixed in 3.4.1, and the 3.4.0 warning is just bogus.
Ok, I see. But most "+m" constraints in the i386 arch files
have already been "fixed"; the one I sent is I think the
last one. Should those "fixes" be undone?
/Mikael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-01 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-30 10:47 [PATCH][2.6.7-rc2] gcc-3.4.0 warning in i386 __down_read_trylock() Mikael Pettersson
2004-05-30 17:22 ` Linus Torvalds
2004-06-01 14:19 ` Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).