summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/m88k/include/atomic.h8
-rw-r--r--sys/arch/m88k/include/lock.h6
-rw-r--r--sys/arch/m88k/include/mmu.h4
3 files changed, 10 insertions, 8 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);
}
diff --git a/sys/arch/m88k/include/lock.h b/sys/arch/m88k/include/lock.h
index baa0439d728..13bfc2d0960 100644
--- a/sys/arch/m88k/include/lock.h
+++ b/sys/arch/m88k/include/lock.h
@@ -1,6 +1,6 @@
#ifndef _M88K_LOCK_H_
#define _M88K_LOCK_H_
-/* $OpenBSD: lock.h,v 1.4 2007/10/27 20:35:21 miod Exp $ */
+/* $OpenBSD: lock.h,v 1.5 2007/10/27 20:36:17 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -55,7 +55,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *l)
do {
old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("xmem %0, %1, r0" : "+r" (old) : "r" (l));
+ ("xmem %0, %2, r0" : "+r"(old), "+m"(*l) : "r"(l));
} while (old != __SIMPLELOCK_UNLOCKED);
}
@@ -70,7 +70,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_t *l)
u_int old = __SIMPLELOCK_LOCKED;
__asm__ __volatile__
- ("xmem %0, %1, r0" : "+r" (old) : "r" (l));
+ ("xmem %0, %2, r0" : "+r"(old), "+m"(*l) : "r"(l));
return (old == __SIMPLELOCK_UNLOCKED);
}
diff --git a/sys/arch/m88k/include/mmu.h b/sys/arch/m88k/include/mmu.h
index ff0a2885653..321a9c3ccc3 100644
--- a/sys/arch/m88k/include/mmu.h
+++ b/sys/arch/m88k/include/mmu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mmu.h,v 1.9 2007/10/27 20:32:20 miod Exp $ */
+/* $OpenBSD: mmu.h,v 1.10 2007/10/27 20:36:17 miod Exp $ */
/*
* This file bears almost no resemblance to the original m68k file,
@@ -212,7 +212,7 @@ invalidate_pte(pt_entry_t *pte)
oldpte = PG_NV;
__asm__ __volatile__
- ("xmem %0, %2, r0" : "=r"(oldpte) : "0"(oldpte), "r"(pte));
+ ("xmem %0, %2, r0" : "+r"(oldpte), "+m"(*pte) : "r"(pte));
return oldpte;
}