Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / include / mach-xen / asm / cmpxchg_32.h
1 #ifndef _ASM_X86_XEN_CMPXCHG_32_H
2 #define _ASM_X86_XEN_CMPXCHG_32_H
3
4 static inline u64 get_64bit(const volatile u64 *ptr)
5 {
6         u64 res;
7         __asm__("movl %%ebx,%%eax\n"
8                 "movl %%ecx,%%edx\n"
9                 LOCK_PREFIX "cmpxchg8b %1"
10                 : "=&A" (res) : "m" (*ptr));
11         return res;
12 }
13
14 static inline u64 get_64bit_local(const volatile u64 *ptr)
15 {
16         u64 res;
17         __asm__("movl %%ebx,%%eax\n"
18                 "movl %%ecx,%%edx\n"
19                 "cmpxchg8b %1"
20                 : "=&A" (res) : "m" (*ptr));
21         return res;
22 }
23
24 #endif /* _ASM_X86_XEN_CMPXCHG_32_H */