summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-09-05 18:07:13 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-09-05 18:07:13 +0000
commit40a0f7ef955aa6874aa21640f710ec8370569f50 (patch)
treec5b63dc4b7c010bc8fc991d1c2ad68730f8e6320
parent385435d4146128153de57ff665358bfa5ead95da (diff)
Fix inline assembler to make it acceptable to gcc4. Similar to what we've
done to sparc64 a couple of months ago. ok miod@
-rw-r--r--sys/arch/sparc/include/lock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc/include/lock.h b/sys/arch/sparc/include/lock.h
index 88b50a751d4..b19904e93e4 100644
--- a/sys/arch/sparc/include/lock.h
+++ b/sys/arch/sparc/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.2 2010/04/21 03:03:24 deraadt Exp $ */
+/* $OpenBSD: lock.h,v 1.3 2010/09/05 18:07:12 kettenis Exp $ */
/* public domain */
@@ -26,7 +26,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *l)
do {
old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("ldstub %0, %1" : "=m" (*l), "=r" (old) : "0" (*l));
+ ("ldstub [%0], %1" : "=r" (l), "=r" (old) : "0" (l));
} while (old != __SIMPLELOCK_UNLOCKED);
}
@@ -36,7 +36,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *l)
__cpu_simple_lock_t old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("ldstub %0, %1" : "=m" (*l), "=r" (old) : "0" (*l));
+ ("ldstub [%0], %1" : "=r" (l), "=r" (old) : "0" (l));
return (old == __SIMPLELOCK_UNLOCKED);
}