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/hppa/atomic Provide _atomic_cas_8_up an...
details: https://anonhg.NetBSD.org/src/rev/48e4bb68d682
branches: trunk
changeset: 326438:48e4bb68d682
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Jan 29 11:03:04 2014 +0000
description:
Provide _atomic_cas_8_up and _atomic_cas_16_up functions
diffstat:
common/lib/libc/arch/hppa/atomic/Makefile.inc | 5 ++-
common/lib/libc/arch/hppa/atomic/atomic_cas_up.S | 26 +++++++++++++++++++++++-
2 files changed, 28 insertions(+), 3 deletions(-)
diffs (56 lines):
diff -r 2bc7439a53ba -r 48e4bb68d682 common/lib/libc/arch/hppa/atomic/Makefile.inc
--- a/common/lib/libc/arch/hppa/atomic/Makefile.inc Wed Jan 29 10:20:11 2014 +0000
+++ b/common/lib/libc/arch/hppa/atomic/Makefile.inc Wed Jan 29 11:03:04 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.8 2011/01/17 07:29:17 skrll Exp $
+# $NetBSD: Makefile.inc,v 1.9 2014/01/29 11:03:04 skrll Exp $
.if defined(LIB)
@@ -17,7 +17,8 @@
SRCS+= atomic_init_testset.c
SRCS+= 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
. endif
.endif
diff -r 2bc7439a53ba -r 48e4bb68d682 common/lib/libc/arch/hppa/atomic/atomic_cas_up.S
--- a/common/lib/libc/arch/hppa/atomic/atomic_cas_up.S Wed Jan 29 10:20:11 2014 +0000
+++ b/common/lib/libc/arch/hppa/atomic/atomic_cas_up.S Wed Jan 29 11:03:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic_cas_up.S,v 1.2 2011/01/16 12:07:26 skrll Exp $ */
+/* $NetBSD: atomic_cas_up.S,v 1.3 2014/01/29 11:03:04 skrll Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -44,3 +44,27 @@
bv,n %r0(%rp)
EXIT(_atomic_cas_up)
+
+LEAF_ENTRY_NOPROFILE(_atomic_cas_16_up)
+ .hidden _C_LABEL(_atomic_cas_16_up)
+
+RAS_START_ASM_HIDDEN(_atomic_cas_16)
+ ldh 0(%arg0),%ret0
+ comb,<>,n %arg1, %ret0, 1f
+ sth %arg2, 0(%arg0)
+RAS_END_ASM_HIDDEN(_atomic_cas_16)
+1:
+ bv,n %r0(%rp)
+EXIT(_atomic_cas_16_up)
+
+LEAF_ENTRY_NOPROFILE(_atomic_cas_8_up)
+ .hidden _C_LABEL(_atomic_cas_8_up)
+
+RAS_START_ASM_HIDDEN(_atomic_cas_8)
+ ldb 0(%arg0),%ret0
+ comb,<>,n %arg1, %ret0, 1f
+ stb %arg2, 0(%arg0)
+RAS_END_ASM_HIDDEN(_atomic_cas_8)
+1:
+ bv,n %r0(%rp)
+EXIT(_atomic_cas_8_up)
Home |
Main Index |
Thread Index |
Old Index