summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include/atomic.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-10-27 20:36:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-10-27 20:36:18 +0000
commit9a1af8dfbf9ed47c3bc12802c7d670480d0666b7 (patch)
tree5d892875390fffb55e1f76abc666e974612f9ca8 /sys/arch/m88k/include/atomic.h
parent46e1c801d7a9835e871c570047964806aa7e6485 (diff)
Use the same assembly constraints for all inline assembler xmem constructs.
Diffstat (limited to 'sys/arch/m88k/include/atomic.h')
-rw-r--r--sys/arch/m88k/include/atomic.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/m88k/include/atomic.h b/sys/arch/m88k/include/atomic.h
index d551ba1885c..348c36b0c8e 100644
--- a/sys/arch/m88k/include/atomic.h
+++ b/sys/arch/m88k/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.3 2007/03/21 05:28:51 miod Exp $ */
+/* $OpenBSD: atomic.h,v 1.4 2007/10/27 20:36:17 miod Exp $ */
/* Public Domain */
@@ -15,7 +15,8 @@ atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
do {
old = *uip;
new = old | v;
- __asm__ __volatile__ ("xmem %0, %1, r0" : "+r"(new) : "r"(uip));
+ __asm__ __volatile__
+ ("xmem %0, %2, r0" : "+r"(new), "+m"(*uip) : "r"(uip));
} while (old != new);
}
@@ -27,7 +28,8 @@ atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v)
do {
old = *uip;
new = old & ~v;
- __asm__ __volatile__ ("xmem %0, %1, r0" : "+r"(new) : "r"(uip));
+ __asm__ __volatile__
+ ("xmem %0, %2, r0" : "+r"(new), "+m"(*uip) : "r"(uip));
} while (old != new);
}