public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Inconsistent constraint in asm-i386/rwsem.h
@ 2001-05-06 23:16 Tom Leete
  0 siblings, 0 replies; only message in thread
From: Tom Leete @ 2001-05-06 23:16 UTC (permalink / raw)
  To: Linus Torvalds, Alan Cox; +Cc: linux-kernel

Hi,

In include/asm-i386/rwsem.h:__up_read(), the auto variable 'tmp' is
asserted to be in edx. This patch adjusts the constraint to match
the variable.

It could be argued that tmp should be declared register instead. I
didn't because the function is inlined. The compiler will know how
much register pressure there is in each instance.

Cheers,
Tom

$ diff -u linux-2.4.5-pre1/include/asm-i386/rwsem.h~
linux-2.4.5-pre1/include/asm-i386/rwsem.h
--- linux-2.4.5-pre1/include/asm-i386/rwsem.h~	Sun May  6 05:48:08 2001
+++ linux-2.4.5-pre1/include/asm-i386/rwsem.h	Sun May  6 07:17:36 2001
@@ -164,7 +164,7 @@
 		"  jmp       1b\n"
 		".previous\n"
 		"# ending __up_read\n"
-		: "+m"(sem->count), "+d"(tmp)
+		: "+m"(sem->count), "+m"(tmp)
 		: "a"(sem)
 		: "memory", "cc");
 }


-- 
The Daemons lurk and are dumb. -- Emerson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-06 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-06 23:16 [PATCH] Inconsistent constraint in asm-i386/rwsem.h Tom Leete

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox