From: "Jan Beulich" Subject: [PATCH] x86: usercopy assembly constraints Date: Tue, 13 Nov 2007 16:02:26 +0000 Message-ID: <4739D8A2.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Besides only being correct this way, this helps work around a gcc 4.3 issue. At the same time, add some white space, re-order the inputs, and remove a bogus cast. Signed-off-by: Jan Beulich Index: 2007-11-13/xen/arch/x86/usercopy.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-11-13.orig/xen/arch/x86/usercopy.c 2007-11-13 15:36:25.0000000= 00 +0100 +++ 2007-11-13/xen/arch/x86/usercopy.c 2007-11-13 15:37:36.000000000 = +0100 @@ -41,10 +41,10 @@ unsigned long __copy_to_user_ll(void __u " "__FIXUP_WORD" 0b,3b\n" " "__FIXUP_WORD" 1b,2b\n" ".previous" - : "=3D&c"(__n), "=3D&D" (__d0), "=3D&S" (__d1), "=3Dr"(__d2= ) - : "3"(__n), "0"(__n), "1"(to), "2"(from) + : "=3D&c" (__n), "=3D&D" (__d0), "=3D&S" (__d1), "=3D&r" = (__d2) + : "0" (__n), "1" (to), "2" (from), "3" (__n) : "memory"); - return (unsigned)__n; + return __n; } =20 unsigned long @@ -85,10 +85,10 @@ __copy_from_user_ll(void *to, const void " "__FIXUP_WORD" 0b,3b\n" " "__FIXUP_WORD" 1b,6b\n" ".previous" - : "=3D&c"(__n), "=3D&D" (__d0), "=3D&S" (__d1), "=3Dr"(__d2= ) - : "3"(__n), "0"(__n), "1"(to), "2"(from) + : "=3D&c" (__n), "=3D&D" (__d0), "=3D&S" (__d1), "=3D&r" = (__d2) + : "0" (__n), "1" (to), "2" (from), "3" (__n) : "memory"); - return (unsigned)__n; + return __n; } =20 /**