diff options
author | 2010-09-05 18:07:12 +0000 | |
---|---|---|
committer | 2010-09-05 18:07:12 +0000 | |
commit | 1fa0e6a7547c3cdea3c2515272f2eba2427e5350 (patch) | |
tree | 3bf6b0f50fced2aca7afa5c530d484d70ab7c2b0 | |
parent | Properly invoke bus_dmamap_sync() around the ring descriptors. No functional (diff) | |
download | wireguard-openbsd-1fa0e6a7547c3cdea3c2515272f2eba2427e5350.tar.xz wireguard-openbsd-1fa0e6a7547c3cdea3c2515272f2eba2427e5350.zip |
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.h | 6 |
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); } |