diff options
Diffstat (limited to 'libjava/sysdep/x86-64/locks.h')
-rw-r--r-- | libjava/sysdep/x86-64/locks.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libjava/sysdep/x86-64/locks.h b/libjava/sysdep/x86-64/locks.h index bad6de6dc6f..7fb9bbba0bf 100644 --- a/libjava/sysdep/x86-64/locks.h +++ b/libjava/sysdep/x86-64/locks.h @@ -26,13 +26,13 @@ compare_and_swap(volatile obj_addr_t *addr, obj_addr_t old, obj_addr_t new_val) char result; #ifdef __x86_64__ __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" - : "+m"(*(addr)), "=q"(result) - : "r" (new_val), "a"(old) + : "=m"(*(addr)), "=q"(result) + : "r" (new_val), "a"(old), "m"(*addr) : "memory"); #else __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" - : "+m"(*(addr)), "=q"(result) - : "r" (new_val), "a"(old) + : "=m"(*(addr)), "=q"(result) + : "r" (new_val), "a"(old), "m"(*addr) : "memory"); #endif return (bool) result; |