summaryrefslogtreecommitdiff
path: root/libjava/sysdep
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-16 17:25:26 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-16 17:25:26 +0000
commitb7ec8e346bea007bbc2a33d9dba08b741e857f6b (patch)
tree056e9d83c8e63d5ac20edbb3ca15277774abfaf6 /libjava/sysdep
parentb77139bb5ee71f08571091ed88c66f88fa5a40fe (diff)
downloadgcc-b7ec8e346bea007bbc2a33d9dba08b741e857f6b.tar.gz
2004-01-16 Andrew Haley <aph@redhat.com>
* sysdep/x86-64/locks.h: Don't use in/out memory constraints. * sysdep/i386/locks.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/sysdep')
-rw-r--r--libjava/sysdep/i386/locks.h4
-rw-r--r--libjava/sysdep/x86-64/locks.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/libjava/sysdep/i386/locks.h b/libjava/sysdep/i386/locks.h
index a9501ae99b2..0e2cd797148 100644
--- a/libjava/sysdep/i386/locks.h
+++ b/libjava/sysdep/i386/locks.h
@@ -25,8 +25,8 @@ compare_and_swap(volatile obj_addr_t *addr,
{
char result;
__asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
- : "+m"(*(addr)), "=q"(result)
- : "r" (new_val), "a"(old)
+ : "=m"(*addr), "=q"(result)
+ : "r" (new_val), "a"(old), "m"(*addr)
: "memory");
return (bool) result;
}
diff --git a/libjava/sysdep/x86-64/locks.h b/libjava/sysdep/x86-64/locks.h
index bad6de6dc6f..7fb9bbba0bf 100644
--- a/libjava/sysdep/x86-64/locks.h
+++ b/libjava/sysdep/x86-64/locks.h
@@ -26,13 +26,13 @@ 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)
+ : "=m"(*(addr)), "=q"(result)
+ : "r" (new_val), "a"(old), "m"(*addr)
: "memory");
#else
__asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
- : "+m"(*(addr)), "=q"(result)
- : "r" (new_val), "a"(old)
+ : "=m"(*(addr)), "=q"(result)
+ : "r" (new_val), "a"(old), "m"(*addr)
: "memory");
#endif
return (bool) result;