WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: usercopy assembly constraints

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: usercopy assembly constraints
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 13 Nov 2007 16:02:26 +0000
Delivery-date: Tue, 13 Nov 2007 08:02:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <jbeulich@xxxxxxxxxx>

Index: 2007-11-13/xen/arch/x86/usercopy.c
===================================================================
--- 2007-11-13.orig/xen/arch/x86/usercopy.c     2007-11-13 15:36:25.000000000 
+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"
-               : "=&c"(__n), "=&D" (__d0), "=&S" (__d1), "=r"(__d2)
-               : "3"(__n), "0"(__n), "1"(to), "2"(from)
+               : "=&c" (__n), "=&D" (__d0), "=&S" (__d1), "=&r" (__d2)
+               : "0" (__n), "1" (to), "2" (from), "3" (__n)
                : "memory");
-       return (unsigned)__n;
+       return __n;
 }
 
 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"
-               : "=&c"(__n), "=&D" (__d0), "=&S" (__d1), "=r"(__d2)
-               : "3"(__n), "0"(__n), "1"(to), "2"(from)
+               : "=&c" (__n), "=&D" (__d0), "=&S" (__d1), "=&r" (__d2)
+               : "0" (__n), "1" (to), "2" (from), "3" (__n)
                : "memory");
-       return (unsigned)__n;
+       return __n;
 }
 
 /**




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>