Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/arm/atomic Add _atomic_cas_16_up and _a...
details: https://anonhg.NetBSD.org/src/rev/e183d81c9448
branches: trunk
changeset: 326368:e183d81c9448
user: matt <matt%NetBSD.org@localhost>
date: Mon Jan 27 18:05:24 2014 +0000
description:
Add _atomic_cas_16_up and _atomic_cas_8_up
diffstat:
common/lib/libc/arch/arm/atomic/Makefile.inc | 4 ++-
common/lib/libc/arch/arm/atomic/atomic_cas_up.S | 34 ++++++++++++++++++++++++-
2 files changed, 36 insertions(+), 2 deletions(-)
diffs (63 lines):
diff -r de4e86a24a57 -r e183d81c9448 common/lib/libc/arch/arm/atomic/Makefile.inc
--- a/common/lib/libc/arch/arm/atomic/Makefile.inc Mon Jan 27 18:03:44 2014 +0000
+++ b/common/lib/libc/arch/arm/atomic/Makefile.inc Mon Jan 27 18:05:24 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.14 2013/11/08 22:42:52 matt Exp $
+# $NetBSD: Makefile.inc,v 1.15 2014/01/27 18:05:24 matt Exp $
ARMV6= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
ARMV6+= ${CFLAGS:M-march=armv6*:} ${CFLAGS:M-mcpu=arm11*}
@@ -58,6 +58,8 @@
SRCS.atomic+= atomic_init_testset.c
SRCS.atomic+= atomic_cas_up.S
CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP
+CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_16_UP
+CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_8_UP
.else
SRCS.atomic+= atomic_init_cas.c
.endif
diff -r de4e86a24a57 -r e183d81c9448 common/lib/libc/arch/arm/atomic/atomic_cas_up.S
--- a/common/lib/libc/arch/arm/atomic/atomic_cas_up.S Mon Jan 27 18:03:44 2014 +0000
+++ b/common/lib/libc/arch/arm/atomic/atomic_cas_up.S Mon Jan 27 18:05:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_cas_up.S,v 1.4 2013/08/19 00:35:06 matt Exp $ */
+/* $NetBSD: atomic_cas_up.S,v 1.5 2014/01/27 18:05:24 matt Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -48,3 +48,35 @@
RAS_END_ASM_HIDDEN(_atomic_cas)
1: RET
END(_atomic_cas_up)
+
+ENTRY(_atomic_cas_16_up)
+ mov r3, r0
+ .align 0
+RAS_START_ASM_HIDDEN(_atomic_cas_16)
+ ldrh r0, [r3]
+ cmp r0, r1
+#if defined(__thumb__)
+ beq 1f
+#else
+ strheq r2, [r3]
+#endif
+ .align 0
+RAS_END_ASM_HIDDEN(_atomic_cas_16)
+1: RET
+END(_atomic_cas_16_up)
+
+ENTRY(_atomic_cas_8_up)
+ mov r3, r0
+ .align 0
+RAS_START_ASM_HIDDEN(_atomic_cas_8)
+ ldrb r0, [r3]
+ cmp r0, r1
+#if defined(__thumb__)
+ beq 1f
+#else
+ strbeq r2, [r3]
+#endif
+ .align 0
+RAS_END_ASM_HIDDEN(_atomic_cas_8)
+1: RET
+END(_atomic_cas_8_up)
Home |
Main Index |
Thread Index |
Old Index