diff options
Diffstat (limited to 'libjava/sysdep')
-rw-r--r-- | libjava/sysdep/i386/locks.h | 4 | ||||
-rw-r--r-- | libjava/sysdep/x86-64/locks.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libjava/sysdep/i386/locks.h b/libjava/sysdep/i386/locks.h index a9501ae..0e2cd79 100644 --- a/libjava/sysdep/i386/locks.h +++ b/libjava/sysdep/i386/locks.h @@ -25,8 +25,8 @@ compare_and_swap(volatile obj_addr_t *addr, { char result; __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"); return (bool) result; } diff --git a/libjava/sysdep/x86-64/locks.h b/libjava/sysdep/x86-64/locks.h index bad6de6..7fb9bbb 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; |