summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-07-01 18:25:31 +0000
committerkettenis <kettenis@openbsd.org>2020-07-01 18:25:31 +0000
commit68e64030e89f5f845327958b960519832bc59e14 (patch)
treea339c2698ed1fc5b220f90d8fbdb58ecd4b1edc0
parentImplement CLKF_INTR, CLKF_USERMODE and CLKF_PC. (diff)
downloadwireguard-openbsd-68e64030e89f5f845327958b960519832bc59e14.tar.xz
wireguard-openbsd-68e64030e89f5f845327958b960519832bc59e14.zip
atomic_swap_uint should still use a lwarx/stwcx. pair.
-rw-r--r--sys/arch/powerpc64/include/atomic.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/powerpc64/include/atomic.h b/sys/arch/powerpc64/include/atomic.h
index 913b88fc2f0..2f58aa80db7 100644
--- a/sys/arch/powerpc64/include/atomic.h
+++ b/sys/arch/powerpc64/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.1 2020/05/16 17:11:14 kettenis Exp $ */
+/* $OpenBSD: atomic.h,v 1.2 2020/07/01 18:25:31 kettenis Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -117,8 +117,8 @@ _atomic_swap_uint(volatile unsigned int *p, unsigned int v)
unsigned int rv;
__asm volatile (
- "1: ldarx %0, 0, %2 \n"
- " stdcx. %3, 0, %2 \n"
+ "1: lwarx %0, 0, %2 \n"
+ " stwcx. %3, 0, %2 \n"
" bne- 1b \n"
: "=&r" (rv), "+m" (*p)
: "r" (p), "r" (v)