From 9fa5237cb7f4a63d9e98ba3db252531e35331872 Mon Sep 17 00:00:00 2001
From: Bryce McKinlay <bryce@waitaki.otago.ac.nz>
Date: Fri, 25 Jan 2002 02:53:37 +0000
Subject: [PATCH] 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
---
 libjava/ChangeLog              | 4 ++++
 libjava/java/lang/natObject.cc | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 7db8af50acde..8cef7e742dc3 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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,
diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc
index 816268c4f37e..bf38433a758b 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;
   }
 
-- 
GitLab