locks.h (compare_and_swap): Fix multilib support.
2002-09-30 Bo Thorsen <bo@suse.de> * sysdep/x86-64/locks.h (compare_and_swap): Fix multilib support. From-SVN: r57682
This commit is contained in:
parent
fac3fa281d
commit
73bff06445
@ -1,3 +1,7 @@
|
||||
2002-09-30 Bo Thorsen <bo@suse.de>
|
||||
|
||||
* sysdep/x86-64/locks.h (compare_and_swap): Fix multilib support.
|
||||
|
||||
2002-09-30 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* java/io/ObjectInputStream.java (resolveProxyClass): New method
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user