Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/include alpha: __cpu_simple_lock audit.
details: https://anonhg.NetBSD.org/src/rev/317998b021b7
branches: trunk
changeset: 361545:317998b021b7
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 13 13:42:30 2022 +0000
description:
alpha: __cpu_simple_lock audit.
Add missing "cc" and "memory" asm clobbers to the compiler can't
reorder memory access around these. The necessary memory barrier
instructions, mb, already appear in all the right places.
diffstat:
sys/arch/alpha/include/lock.h | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 3991869f66c9 -r 317998b021b7 sys/arch/alpha/include/lock.h
--- a/sys/arch/alpha/include/lock.h Sun Feb 13 13:42:21 2022 +0000
+++ b/sys/arch/alpha/include/lock.h Sun Feb 13 13:42:30 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.32 2022/02/12 17:17:53 riastradh Exp $ */
+/* $NetBSD: lock.h,v 1.33 2022/02/13 13:42:30 riastradh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
" # END __cpu_simple_lock\n"
: "=&r" (t0), "=m" (*alp)
: "i" (__SIMPLELOCK_LOCKED), "m" (*alp)
- : "memory");
+ : "cc", "memory");
}
static __inline int
@@ -126,7 +126,7 @@
" # END __cpu_simple_lock_try"
: "=&r" (t0), "=r" (v0), "=m" (*alp)
: "i" (__SIMPLELOCK_LOCKED), "m" (*alp)
- : "memory");
+ : "cc", "memory");
return (v0 != 0);
}
@@ -140,7 +140,9 @@
" mb \n"
" stl $31, %0 \n"
" # END __cpu_simple_unlock"
- : "=m" (*alp));
+ : "=m" (*alp)
+ : /* no inputs */
+ : "memory");
}
#if defined(MULTIPROCESSOR)
Home |
Main Index |
Thread Index |
Old Index