diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8c2ab3e243a..eef5d761cb7 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2002-09-30 Bo Thorsen + + * sysdep/x86-64/locks.h (compare_and_swap): Fix multilib support. + 2002-09-30 Tom Tromey * java/io/ObjectInputStream.java (resolveProxyClass): New method diff --git a/libjava/sysdep/x86-64/locks.h b/libjava/sysdep/x86-64/locks.h index cb6be85951b..bad6de6dc6f 100644 --- a/libjava/sysdep/x86-64/locks.h +++ b/libjava/sysdep/x86-64/locks.h @@ -24,10 +24,17 @@ inline static bool 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) : "memory"); +#else + __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" + : "+m"(*(addr)), "=q"(result) + : "r" (new_val), "a"(old) + : "memory"); +#endif return (bool) result; }