summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2017-05-28 01:33:26 +0000
committerjsg <jsg@openbsd.org>2017-05-28 01:33:26 +0000
commit5f383f478cde0373447171e33e28d08d5178f070 (patch)
treef5958c69b2ca8c296143cad728222f73c6103652
parentuse pread and pwrite to save code and syscalls. ok mlarkin (diff)
downloadwireguard-openbsd-5f383f478cde0373447171e33e28d08d5178f070.tar.xz
wireguard-openbsd-5f383f478cde0373447171e33e28d08d5178f070.zip
remove bogus atomic_swap_64 code from i386
xchg can't handle 64 bit values on i386. gcc errors if the code is called, clang errors if it is included. ok mlarkin@ kettenis@
-rw-r--r--sys/arch/i386/include/atomic.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/arch/i386/include/atomic.h b/sys/arch/i386/include/atomic.h
index 5a3ceb95345..4e5266dc200 100644
--- a/sys/arch/i386/include/atomic.h
+++ b/sys/arch/i386/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.17 2017/05/27 20:12:12 kettenis Exp $ */
+/* $OpenBSD: atomic.h,v 1.18 2017/05/28 01:33:26 jsg Exp $ */
/* $NetBSD: atomic.h,v 1.1.2.2 2000/02/21 18:54:07 sommerfeld Exp $ */
/*-
@@ -106,17 +106,6 @@ _atomic_swap_ulong(volatile unsigned long *p, unsigned long n)
}
#define atomic_swap_ulong(_p, _n) _atomic_swap_ulong((_p), (_n))
-static inline uint64_t
-_atomic_swap_64(volatile uint64_t *p, uint64_t n)
-{
- __asm volatile("xchgl %0, %1"
- : "=a" (n), "=m" (*p)
- : "0" (n), "m" (*p));
-
- return (n);
-}
-#define atomic_swap_64(_p, _n) _atomic_swap_64((_p), (_n))
-
static inline void *
_atomic_swap_ptr(volatile void *p, void *n)
{