diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7db8af50acd..8cef7e742dc 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2002-01-25 Bryce McKinlay + + * java/lang/natObject.cc (X86 compare_and_swap): Use +m constraint. + 2002-01-24 Per Bothner * verify.cc (is_assignable_from_slow): If target is an interface, diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc index 816268c4f37..bf38433a758 100644 --- a/libjava/java/lang/natObject.cc +++ b/libjava/java/lang/natObject.cc @@ -327,8 +327,9 @@ typedef size_t obj_addr_t; /* Integer type big enough for object */ { char result; __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" - : "=m"(*(addr)), "=q"(result) - : "r" (new_val), "0"(*(addr)), "a"(old) : "memory"); + : "+m"(*(addr)), "=q"(result) + : "r" (new_val), "a"(old) + : "memory"); return (bool) result; }