natObject.cc (X86 compare_and_swap): Use +m constraint.

2002-01-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* java/lang/natObject.cc (X86 compare_and_swap): Use +m constraint.

From-SVN: r49198
This commit is contained in:
Bryce McKinlay 2002-01-25 02:53:37 +00:00 committed by Bryce McKinlay
parent 6b016bf436
commit 9fa5237cb7
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002-01-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/lang/natObject.cc (X86 compare_and_swap): Use +m constraint.
2002-01-24 Per Bothner <per@bothner.com>
* verify.cc (is_assignable_from_slow): If target is an interface,

View File

@ -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;
}