public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Fix asm constraint in put_user
@ 2005-11-21 15:12 Andreas Schwab
  2005-11-21 16:08 ` David Mosberger-Tang
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Andreas Schwab @ 2005-11-21 15:12 UTC (permalink / raw)
  To: linux-ia64

The st insn on the ia64 does not allow the post-increment to come from a
register (only ld does).  Thus the "m" constraint is not suitable for the
asm statement in __put_user_size.

Signed-off-by: Andreas Schwab <schwab@suse.de>

--- linux-2.6.14/include/asm-ia64/uaccess.h.~1~	2005-10-28 02:02:08.000000000 +0200
+++ linux-2.6.14/include/asm-ia64/uaccess.h	2005-11-20 18:15:46.559296784 +0100
@@ -154,10 +154,10 @@ do {												\
 # define __put_user_size(val, addr, n, err)							\
 do {												\
 	register long __pu_r8 asm ("r8") = 0;							\
-	asm volatile ("\n[1:]\tst"#n" %1=%r2%P1\t// %0 gets overwritten by exception handler\n"	\
+	asm volatile ("\n[1:]\tst"#n" [%1]=%r2\t// %0 gets overwritten by exception handler\n"	\
 		      "\t.xdata4 \"__ex_table\", 1b-., 1f-.\n"					\
 		      "[1:]"									\
-		      : "=r"(__pu_r8) : "m"(__m(addr)), "rO"(val), "0"(__pu_r8));		\
+		      : "=r"(__pu_r8) : "r"(addr), "rO"(val), "0"(__pu_r8));		\
 	(err) = __pu_r8;									\
 } while (0)
 

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-23 22:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21 15:12 Fix asm constraint in put_user Andreas Schwab
2005-11-21 16:08 ` David Mosberger-Tang
2005-11-21 16:48 ` Andreas Schwab
2005-11-21 19:03 ` James E Wilson
2005-11-21 20:32 ` Andreas Schwab
2005-11-21 21:26 ` Andreas Schwab
2005-11-21 22:11 ` Luck, Tony
2005-11-21 22:38 ` David Mosberger-Tang
2005-11-23  6:02 ` James E Wilson
2005-11-23 22:08 ` James E Wilson

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