[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Add 8-byte version of cmpxchg_user() for i386.



ChangeSet 1.1352, 2005/04/21 11:46:29+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Add 8-byte version of cmpxchg_user() for i386.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 system.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)


diff -Nru a/xen/include/asm-x86/system.h b/xen/include/asm-x86/system.h
--- a/xen/include/asm-x86/system.h      2005-04-21 07:02:53 -04:00
+++ b/xen/include/asm-x86/system.h      2005-04-21 07:02:53 -04:00
@@ -152,6 +152,23 @@
     case 4:                                                             \
         __cmpxchg_user(_p,_o,_n,"l","","r");                            \
         break;                                                          \
+    case 8:                                                             \
+        __asm__ __volatile__ (                                          \
+            "1: " LOCK_PREFIX "cmpxchg8b %4\n"                          \
+            "2:\n"                                                      \
+            ".section .fixup,\"ax\"\n"                                  \
+            "3:     movl $1,%1\n"                                       \
+            "       jmp 2b\n"                                           \
+            ".previous\n"                                               \
+            ".section __ex_table,\"a\"\n"                               \
+            "       .align 4\n"                                         \
+            "       .long 1b,3b\n"                                      \
+            ".previous"                                                 \
+            : "=A" (_o), "=r" (_rc)                                     \
+            : "c" ((u32)((u64)(_n)>>32)), "b" ((u32)(_n)),              \
+              "m" (*__xg((volatile void *)(_p))), "0" (_o), "1" (0)     \
+            : "memory");                                                \
+        break;                                                          \
     }                                                                   \
     _rc;                                                                \
 })

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.