Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
This commit is contained in:
parent
49de48ba03
commit
b290679a78
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_add_32.S,v 1.6 2013/11/08 22:42:52 matt Exp $ */
|
||||
/* $NetBSD: atomic_add_32.S,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -56,7 +56,7 @@ ATOMIC_OP_ALIAS(atomic_add_32,_atomic_add_32)
|
||||
ATOMIC_OP_ALIAS(atomic_add_int,_atomic_add_32)
|
||||
ATOMIC_OP_ALIAS(atomic_add_long,_atomic_add_32)
|
||||
ATOMIC_OP_ALIAS(atomic_add_ptr,_atomic_add_32)
|
||||
STRONG_ALIAS(__sync_fetch_and_add_4,_atomic_add_32)
|
||||
CRT_ALIAS(__sync_fetch_and_add_4,_atomic_add_32)
|
||||
STRONG_ALIAS(_atomic_add_int,_atomic_add_32)
|
||||
STRONG_ALIAS(_atomic_add_long,_atomic_add_32)
|
||||
STRONG_ALIAS(_atomic_add_ptr,_atomic_add_32)
|
||||
@ -65,7 +65,7 @@ ATOMIC_OP_ALIAS(atomic_sub_32,_atomic_sub_32)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_int,_atomic_sub_32)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_long,_atomic_sub_32)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_ptr,_atomic_sub_32)
|
||||
STRONG_ALIAS(__sync_fetch_and_sub_4,_atomic_sub_32)
|
||||
CRT_ALIAS(__sync_fetch_and_sub_4,_atomic_sub_32)
|
||||
STRONG_ALIAS(_atomic_sub_int,_atomic_sub_32)
|
||||
STRONG_ALIAS(_atomic_sub_long,_atomic_sub_32)
|
||||
STRONG_ALIAS(_atomic_sub_ptr,_atomic_sub_32)
|
||||
@ -92,7 +92,7 @@ ATOMIC_OP_ALIAS(atomic_add_32_nv,_atomic_add_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_add_int_nv,_atomic_add_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_add_long_nv,_atomic_add_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_add_ptr_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
CRT_ALIAS(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(_atomic_add_int_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv)
|
||||
@ -101,7 +101,7 @@ ATOMIC_OP_ALIAS(atomic_sub_32_nv,_atomic_sub_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_int_nv,_atomic_sub_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_long_nv,_atomic_sub_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_ptr_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(__sync_sub_and_fetch_4,_atomic_sub_32_nv)
|
||||
CRT_ALIAS(__sync_sub_and_fetch_4,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(_atomic_sub_int_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(_atomic_sub_long_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(_atomic_sub_ptr_nv,_atomic_sub_32_nv)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_and_32.S,v 1.6 2013/11/08 22:42:52 matt Exp $ */
|
||||
/* $NetBSD: atomic_and_32.S,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -51,7 +51,7 @@ END(_atomic_and_32)
|
||||
ATOMIC_OP_ALIAS(atomic_and_32,_atomic_and_32)
|
||||
ATOMIC_OP_ALIAS(atomic_and_uint,_atomic_and_32)
|
||||
ATOMIC_OP_ALIAS(atomic_and_ulong,_atomic_and_32)
|
||||
STRONG_ALIAS(__sync_fetch_and_and_4,_atomic_and_32)
|
||||
CRT_ALIAS(__sync_fetch_and_and_4,_atomic_and_32)
|
||||
STRONG_ALIAS(_atomic_and_uint,_atomic_and_32)
|
||||
STRONG_ALIAS(_atomic_and_ulong,_atomic_and_32)
|
||||
|
||||
@ -73,7 +73,7 @@ END(_atomic_and_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_and_32_nv,_atomic_and_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_and_uint_nv,_atomic_and_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
CRT_ALIAS(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(_atomic_and_uint_nv,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_op_asm.h,v 1.4 2013/11/08 22:42:52 matt Exp $ */
|
||||
/* $NetBSD: atomic_op_asm.h,v 1.5 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -44,10 +44,16 @@
|
||||
#if defined(_KERNEL)
|
||||
|
||||
#define ATOMIC_OP_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#ifdef _HARDKERNEL
|
||||
#define CRT_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#endif
|
||||
|
||||
#else /* _KERNEL */
|
||||
|
||||
#define ATOMIC_OP_ALIAS(a,s) WEAK_ALIAS(a,s)
|
||||
#ifdef _LIBC
|
||||
#define CRT_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -67,4 +73,8 @@
|
||||
#define THI r5
|
||||
#endif
|
||||
|
||||
#ifndef CRT_ALIAS
|
||||
#define CRT_ALIAS(a,s)
|
||||
#endif
|
||||
|
||||
#endif /* _ATOMIC_OP_ASM_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_or_32.S,v 1.6 2013/11/08 22:42:52 matt Exp $ */
|
||||
/* $NetBSD: atomic_or_32.S,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -50,7 +50,7 @@ END(_atomic_or_32)
|
||||
ATOMIC_OP_ALIAS(atomic_or_32,_atomic_or_32)
|
||||
ATOMIC_OP_ALIAS(atomic_or_uint,_atomic_or_32)
|
||||
ATOMIC_OP_ALIAS(atomic_or_ulong,_atomic_or_32)
|
||||
STRONG_ALIAS(__sync_fetch_and_or_4,_atomic_or_32)
|
||||
CRT_ALIAS(__sync_fetch_and_or_4,_atomic_or_32)
|
||||
STRONG_ALIAS(_atomic_or_uint,_atomic_or_32)
|
||||
STRONG_ALIAS(_atomic_or_ulong,_atomic_or_32)
|
||||
|
||||
@ -72,7 +72,7 @@ END(_atomic_or_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_or_32_nv,_atomic_or_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_or_uint_nv,_atomic_or_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(__sync_or_and_fetch_4,_atomic_or_32_nv)
|
||||
CRT_ALIAS(__sync_or_and_fetch_4,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(_atomic_or_uint_nv,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_add.S,v 1.8 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_add.S,v 1.9 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@ ATOMIC_OP_ALIAS(atomic_add_long_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(_atomic_add_long_nv,_atomic_add_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_add_ptr_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(_atomic_add_ptr_nv,_atomic_add_32_nv)
|
||||
STRONG_ALIAS(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
CRT_ALIAS(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_add_4)
|
||||
movl 4(%sp), %a0
|
||||
@ -89,7 +89,7 @@ ENTRY(_atomic_add_16_nv)
|
||||
rts
|
||||
END(_atomic_add_16_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_add_and_fetch_2,_atomic_add_16_nv)
|
||||
CRT_ALIAS(__sync_add_and_fetch_2,_atomic_add_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_add_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -111,7 +111,7 @@ ENTRY(_atomic_add_8_nv)
|
||||
rts
|
||||
END(_atomic_add_8_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_add_and_fetch_1,_atomic_add_8_nv)
|
||||
CRT_ALIAS(__sync_add_and_fetch_1,_atomic_add_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_add_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_and.S,v 1.9 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_and.S,v 1.10 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -64,7 +64,7 @@ ATOMIC_OP_ALIAS(atomic_and_ulong_nv,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(_atomic_and_ulong_nv,_atomic_and_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_and_ptr_nv,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(_atomic_and_ptr_nv,_atomic_and_32_nv)
|
||||
STRONG_ALIAS(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
CRT_ALIAS(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_and_4)
|
||||
movl 4(%sp), %a0
|
||||
@ -88,7 +88,7 @@ ENTRY(_atomic_and_16_nv)
|
||||
rts
|
||||
END(_atomic_and_16_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_and_and_fetch_2,_atomic_and_16_nv)
|
||||
CRT_ALIAS(__sync_and_and_fetch_2,_atomic_and_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_and_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -111,7 +111,7 @@ ENTRY(_atomic_and_8_nv)
|
||||
rts
|
||||
END(_atomic_and_8_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_and_and_fetch_1,_atomic_and_8_nv)
|
||||
CRT_ALIAS(__sync_and_and_fetch_1,_atomic_and_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_and_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_cas.S,v 1.9 2014/02/20 16:33:23 martin Exp $ */
|
||||
/* $NetBSD: atomic_cas.S,v 1.10 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ ATOMIC_OP_ALIAS(atomic_cas_ulong,_atomic_cas_32)
|
||||
STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32)
|
||||
ATOMIC_OP_ALIAS(atomic_cas_ptr,_atomic_cas_32)
|
||||
STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32)
|
||||
STRONG_ALIAS(__sync_val_compare_and_swap_4,_atomic_cas_32)
|
||||
CRT_ALIAS(__sync_val_compare_and_swap_4,_atomic_cas_32)
|
||||
|
||||
ATOMIC_OP_ALIAS(atomic_cas_32_ni,_atomic_cas_32)
|
||||
STRONG_ALIAS(_atomic_cas_32_ni,_atomic_cas_32)
|
||||
@ -85,7 +85,7 @@ ENTRY(_atomic_cas_16)
|
||||
END(_atomic_cas_16)
|
||||
|
||||
ATOMIC_OP_ALIAS(atomic_cas_16,_atomic_cas_16)
|
||||
STRONG_ALIAS(__sync_val_compare_and_swap_2,_atomic_cas_16)
|
||||
CRT_ALIAS(__sync_val_compare_and_swap_2,_atomic_cas_16)
|
||||
|
||||
ENTRY(__sync_bool_compare_and_swap_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -111,7 +111,7 @@ ENTRY(_atomic_cas_8)
|
||||
END(_atomic_cas_8)
|
||||
|
||||
ATOMIC_OP_ALIAS(atomic_cas_8,_atomic_cas_8)
|
||||
STRONG_ALIAS(__sync_val_compare_and_swap_1,_atomic_cas_8)
|
||||
CRT_ALIAS(__sync_val_compare_and_swap_1,_atomic_cas_8)
|
||||
|
||||
|
||||
ENTRY(__sync_bool_compare_and_swap_1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_nand.S,v 1.1 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_nand.S,v 1.2 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -58,7 +58,7 @@ ATOMIC_OP_ALIAS(atomic_nand_ulong,_atomic_nand_32_nv)
|
||||
STRONG_ALIAS(_atomic_nand_ulong,_atomic_nand_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_nand_ptr,_atomic_nand_32_nv)
|
||||
STRONG_ALIAS(_atomic_nand_ptr,_atomic_nand_32_nv)
|
||||
STRONG_ALIAS(__sync_nand_and_fetch_4,_atomic_nand_32_nv)
|
||||
CRT_ALIAS(__sync_nand_and_fetch_4,_atomic_nand_32_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_nand_4)
|
||||
movl 4(%sp), %a0
|
||||
@ -84,7 +84,7 @@ ENTRY(_atomic_nand_16_nv)
|
||||
rts
|
||||
END(_atomic_nand_16_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_nand_and_fetch_2,_atomic_nand_16_nv)
|
||||
CRT_ALIAS(__sync_nand_and_fetch_2,_atomic_nand_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_nand_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -109,7 +109,7 @@ ENTRY(_atomic_nand_8_nv)
|
||||
rts
|
||||
END(_atomic_nand_8_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_nand_and_fetch_1,_atomic_nand_8_nv)
|
||||
CRT_ALIAS(__sync_nand_and_fetch_1,_atomic_nand_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_nand_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_op_asm.h,v 1.3 2008/04/28 20:22:52 martin Exp $ */
|
||||
/* $NetBSD: atomic_op_asm.h,v 1.4 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
|
||||
@ -37,11 +37,22 @@
|
||||
#if defined(_KERNEL)
|
||||
|
||||
#define ATOMIC_OP_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#ifdef _HARDKERNEL
|
||||
#define CRT_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#endif
|
||||
|
||||
#else /* _KERNEL */
|
||||
|
||||
#define ATOMIC_OP_ALIAS(a,s) WEAK_ALIAS(a,s)
|
||||
#ifdef _LIBC
|
||||
#define CRT_ALIAS(a,s) STRONG_ALIAS(a,s)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifndef CRT_ALIAS
|
||||
#define CRT_ALIAS(a,s)
|
||||
#endif
|
||||
|
||||
#endif /* _ATOMIC_OP_ASM_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_or.S,v 1.9 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_or.S,v 1.10 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@ ATOMIC_OP_ALIAS(atomic_or_ulong_nv,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(_atomic_or_ulong_nv,_atomic_or_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_or_ptr_nv,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(_atomic_or_ptr_nv,_atomic_or_32_nv)
|
||||
STRONG_ALIAS(__sync_or_and_fetch_4, _atomic_or_32_nv)
|
||||
CRT_ALIAS(__sync_or_and_fetch_4, _atomic_or_32_nv)
|
||||
|
||||
|
||||
ENTRY(__sync_fetch_and_or_4)
|
||||
@ -90,7 +90,7 @@ ENTRY(_atomic_or_16_nv)
|
||||
bne 1b
|
||||
rts
|
||||
END(_atomic_or_16_nv)
|
||||
STRONG_ALIAS(__sync_or_and_fetch_2, _atomic_or_16_nv)
|
||||
CRT_ALIAS(__sync_or_and_fetch_2, _atomic_or_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_or_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -112,7 +112,7 @@ ENTRY(_atomic_or_8_nv)
|
||||
bne 1b
|
||||
rts
|
||||
END(_atomic_or_8_nv)
|
||||
STRONG_ALIAS(__sync_or_and_fetch_1, _atomic_or_8_nv)
|
||||
CRT_ALIAS(__sync_or_and_fetch_1, _atomic_or_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_or_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_sub.S,v 1.1 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_sub.S,v 1.2 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@ ATOMIC_OP_ALIAS(atomic_sub_long_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(_atomic_sub_long_nv,_atomic_sub_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_sub_ptr_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(_atomic_sub_ptr_nv,_atomic_sub_32_nv)
|
||||
STRONG_ALIAS(__sync_sub_and_fetch_4,_atomic_sub_32_nv)
|
||||
CRT_ALIAS(__sync_sub_and_fetch_4,_atomic_sub_32_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_sub_4)
|
||||
movl 4(%sp), %a0
|
||||
@ -89,7 +89,7 @@ ENTRY(_atomic_sub_16_nv)
|
||||
rts
|
||||
END(_atomic_sub_16_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_sub_and_fetch_2,_atomic_sub_16_nv)
|
||||
CRT_ALIAS(__sync_sub_and_fetch_2,_atomic_sub_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_sub_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -111,7 +111,7 @@ ENTRY(_atomic_sub_8_nv)
|
||||
rts
|
||||
END(_atomic_sub_8_nv)
|
||||
|
||||
STRONG_ALIAS(__sync_sub_and_fetch_1,_atomic_sub_8_nv)
|
||||
CRT_ALIAS(__sync_sub_and_fetch_1,_atomic_sub_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_sub_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_swap.S,v 1.7 2014/02/18 16:19:28 martin Exp $ */
|
||||
/* $NetBSD: atomic_swap.S,v 1.8 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ ATOMIC_OP_ALIAS(atomic_swap_ulong,_atomic_swap_32)
|
||||
STRONG_ALIAS(_atomic_swap_ulong,_atomic_swap_32)
|
||||
ATOMIC_OP_ALIAS(atomic_swap_ptr,_atomic_swap_32)
|
||||
STRONG_ALIAS(_atomic_swap_ptr,_atomic_swap_32)
|
||||
STRONG_ALIAS(__sync_lock_test_and_set_4,_atomic_swap_32)
|
||||
CRT_ALIAS(__sync_lock_test_and_set_4,_atomic_swap_32)
|
||||
|
||||
|
||||
ENTRY(_atomic_swap_16)
|
||||
@ -63,7 +63,7 @@ ENTRY(_atomic_swap_16)
|
||||
rts
|
||||
END(_atomic_swap_16)
|
||||
ATOMIC_OP_ALIAS(atomic_swap_16,_atomic_swap_16)
|
||||
STRONG_ALIAS(__sync_lock_test_and_set_2,_atomic_swap_16)
|
||||
CRT_ALIAS(__sync_lock_test_and_set_2,_atomic_swap_16)
|
||||
|
||||
ENTRY(_atomic_swap_8)
|
||||
movl 4(%sp), %a0
|
||||
@ -75,4 +75,4 @@ ENTRY(_atomic_swap_8)
|
||||
rts
|
||||
END(_atomic_swap_8)
|
||||
ATOMIC_OP_ALIAS(atomic_swap_8,_atomic_swap_8)
|
||||
STRONG_ALIAS(__sync_lock_test_and_set_1,_atomic_swap_8)
|
||||
CRT_ALIAS(__sync_lock_test_and_set_1,_atomic_swap_8)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_xor.S,v 1.1 2014/02/20 20:39:01 martin Exp $ */
|
||||
/* $NetBSD: atomic_xor.S,v 1.2 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -67,7 +67,7 @@ ATOMIC_OP_ALIAS(atomic_xor_ulong_nv,_atomic_xor_32_nv)
|
||||
STRONG_ALIAS(_atomic_xor_ulong_nv,_atomic_xor_32_nv)
|
||||
ATOMIC_OP_ALIAS(atomic_xor_ptr_nv,_atomic_xor_32_nv)
|
||||
STRONG_ALIAS(_atomic_xor_ptr_nv,_atomic_xor_32_nv)
|
||||
STRONG_ALIAS(__sync_xor_and_fetch_4, _atomic_xor_32_nv)
|
||||
CRT_ALIAS(__sync_xor_and_fetch_4, _atomic_xor_32_nv)
|
||||
|
||||
|
||||
ENTRY(__sync_fetch_and_xor_4)
|
||||
@ -93,7 +93,7 @@ ENTRY(_atomic_xor_16_nv)
|
||||
bne 1b
|
||||
rts
|
||||
END(_atomic_xor_16_nv)
|
||||
STRONG_ALIAS(__sync_xor_and_fetch_2, _atomic_xor_16_nv)
|
||||
CRT_ALIAS(__sync_xor_and_fetch_2, _atomic_xor_16_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_xor_2)
|
||||
movl 4(%sp), %a0
|
||||
@ -117,7 +117,7 @@ ENTRY(_atomic_xor_8_nv)
|
||||
bne 1b
|
||||
rts
|
||||
END(_atomic_xor_8_nv)
|
||||
STRONG_ALIAS(__sync_xor_and_fetch_1, _atomic_xor_8_nv)
|
||||
CRT_ALIAS(__sync_xor_and_fetch_1, _atomic_xor_8_nv)
|
||||
|
||||
ENTRY(__sync_fetch_and_xor_1)
|
||||
movl 4(%sp), %a0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_add_32_cas.c,v 1.7 2014/01/29 15:59:11 joerg Exp $ */
|
||||
/* $NetBSD: atomic_add_32_cas.c,v 1.8 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,11 @@
|
||||
#include <sys/atomic.h>
|
||||
|
||||
uint32_t fetch_and_add_4(volatile uint32_t *, uint32_t, ...)
|
||||
asm("__sync_fetch_and_add_4");
|
||||
#if defined(_LIBC) || defined(_HARDKERNEL)
|
||||
asm("__sync_fetch_and_add_4"); /* C runtime internal */
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
uint32_t
|
||||
fetch_and_add_4(volatile uint32_t *addr, uint32_t val, ...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_add_32_nv_cas.c,v 1.5 2014/01/27 18:36:37 matt Exp $ */
|
||||
/* $NetBSD: atomic_add_32_nv_cas.c,v 1.6 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -48,7 +48,7 @@ atomic_add_32_nv(volatile uint32_t *addr, int32_t val)
|
||||
|
||||
#undef atomic_add_32_nv
|
||||
atomic_op_alias(atomic_add_32_nv,_atomic_add_32_nv)
|
||||
__strong_alias(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
crt_alias(__sync_add_and_fetch_4,_atomic_add_32_nv)
|
||||
|
||||
#undef atomic_add_int_nv
|
||||
atomic_op_alias(atomic_add_int_nv,_atomic_add_32_nv)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_add_64_nv_cas.c,v 1.6 2014/01/27 18:36:37 matt Exp $ */
|
||||
/* $NetBSD: atomic_add_64_nv_cas.c,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ atomic_add_64_nv(volatile uint64_t *addr, int64_t val)
|
||||
|
||||
#undef atomic_add_64_nv
|
||||
atomic_op_alias(atomic_add_64_nv,_atomic_add_64_nv)
|
||||
__strong_alias(__sync_add_and_fetch_8,_atomic_add_64_nv)
|
||||
crt_alias(__sync_add_and_fetch_8,_atomic_add_64_nv)
|
||||
|
||||
#if defined(_LP64)
|
||||
#undef atomic_add_long_nv
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_and_32_cas.c,v 1.8 2014/01/29 15:59:11 joerg Exp $ */
|
||||
/* $NetBSD: atomic_and_32_cas.c,v 1.9 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,11 @@
|
||||
#include <sys/atomic.h>
|
||||
|
||||
uint32_t fetch_and_and_4(volatile uint32_t *, uint32_t, ...)
|
||||
asm("__sync_fetch_and_and_4");
|
||||
#if defined(_LIBC) || defined(_HARDKERNEL)
|
||||
asm("__sync_fetch_and_and_4"); /* C runtime internal */
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
uint32_t
|
||||
fetch_and_and_4(volatile uint32_t *addr, uint32_t val, ...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_and_32_nv_cas.c,v 1.6 2014/01/27 18:43:07 matt Exp $ */
|
||||
/* $NetBSD: atomic_and_32_nv_cas.c,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -48,7 +48,7 @@ atomic_and_32_nv(volatile uint32_t *addr, uint32_t val)
|
||||
|
||||
#undef atomic_and_32_nv
|
||||
atomic_op_alias(atomic_and_32_nv,_atomic_and_32_nv)
|
||||
__strong_alias(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
crt_alias(__sync_and_and_fetch_4,_atomic_and_32_nv)
|
||||
|
||||
#undef atomic_and_uint_nv
|
||||
atomic_op_alias(atomic_and_uint_nv,_atomic_and_32_nv)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_and_64_nv_cas.c,v 1.6 2014/01/27 18:36:37 matt Exp $ */
|
||||
/* $NetBSD: atomic_and_64_nv_cas.c,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ atomic_and_64_nv(volatile uint64_t *addr, uint64_t val)
|
||||
|
||||
#undef atomic_and_64_nv
|
||||
atomic_op_alias(atomic_and_64_nv,_atomic_and_64_nv)
|
||||
__strong_alias(__sync_and_and_fetch_8,_atomic_add_64_nv)
|
||||
crt_alias(__sync_and_and_fetch_8,_atomic_add_64_nv)
|
||||
|
||||
#if defined(_LP64)
|
||||
#undef atomic_and_ulong_nv
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_init_testset.c,v 1.12 2014/01/29 14:49:35 martin Exp $ */
|
||||
/* $NetBSD: atomic_init_testset.c,v 1.13 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: atomic_init_testset.c,v 1.12 2014/01/29 14:49:35 martin Exp $");
|
||||
__RCSID("$NetBSD: atomic_init_testset.c,v 1.13 2014/02/22 17:08:30 martin Exp $");
|
||||
|
||||
#include "atomic_op_namespace.h"
|
||||
|
||||
@ -239,6 +239,6 @@ __strong_alias(_atomic_cas_ulong_ni,_atomic_cas_32)
|
||||
atomic_op_alias(atomic_cas_ptr_ni,_atomic_cas_32)
|
||||
__strong_alias(_atomic_cas_ptr_ni,_atomic_cas_32)
|
||||
|
||||
__strong_alias(__sync_val_compare_and_swap_4,_atomic_cas_32)
|
||||
__strong_alias(__sync_val_compare_and_swap_2,_atomic_cas_16)
|
||||
__strong_alias(__sync_val_compare_and_swap_1,_atomic_cas_8)
|
||||
crt_alias(__sync_val_compare_and_swap_4,_atomic_cas_32)
|
||||
crt_alias(__sync_val_compare_and_swap_2,_atomic_cas_16)
|
||||
crt_alias(__sync_val_compare_and_swap_1,_atomic_cas_8)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_op_namespace.h,v 1.5 2014/02/21 15:51:07 martin Exp $ */
|
||||
/* $NetBSD: atomic_op_namespace.h,v 1.6 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -120,8 +120,18 @@
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#define atomic_op_alias(a,s) __strong_alias(a,s)
|
||||
#ifdef _HARDKERNEL
|
||||
#define crt_alias(a,s) __strong_alias(a,s)
|
||||
#endif
|
||||
#else
|
||||
#define atomic_op_alias(a,s) __weak_alias(a,s)
|
||||
#ifdef _LIBC
|
||||
#define crt_alias(a,s) __strong_alias(a,s)
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifndef crt_alias
|
||||
#define crt_alias(a,s)
|
||||
#endif
|
||||
|
||||
#endif /* _ATOMIC_OP_NAMESPACE_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_or_32_cas.c,v 1.8 2014/01/29 15:59:11 joerg Exp $ */
|
||||
/* $NetBSD: atomic_or_32_cas.c,v 1.9 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,11 @@
|
||||
#include <sys/atomic.h>
|
||||
|
||||
uint32_t fetch_and_or_4(volatile uint32_t *, uint32_t, ...)
|
||||
asm("__sync_fetch_and_or_4");
|
||||
#if defined(_LIBC) || defined(_HARDKERNEL)
|
||||
asm("__sync_fetch_and_or_4"); /* C runtime internal */
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
uint32_t
|
||||
fetch_and_or_4(volatile uint32_t *addr, uint32_t val, ...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_or_32_nv_cas.c,v 1.5 2014/01/27 18:36:37 matt Exp $ */
|
||||
/* $NetBSD: atomic_or_32_nv_cas.c,v 1.6 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -48,7 +48,7 @@ atomic_or_32_nv(volatile uint32_t *addr, uint32_t val)
|
||||
|
||||
#undef atomic_or_32_nv
|
||||
atomic_op_alias(atomic_or_32_nv,_atomic_or_32_nv)
|
||||
__strong_alias(__sync_or_and_fetch_4,_atomic_or_32_nv)
|
||||
crt_alias(__sync_or_and_fetch_4,_atomic_or_32_nv)
|
||||
|
||||
#undef atomic_or_uint_nv
|
||||
atomic_op_alias(atomic_or_uint_nv,_atomic_or_32_nv)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_or_64_nv_cas.c,v 1.6 2014/01/27 18:36:37 matt Exp $ */
|
||||
/* $NetBSD: atomic_or_64_nv_cas.c,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ atomic_or_64_nv(volatile uint64_t *addr, uint64_t val)
|
||||
|
||||
#undef atomic_or_64_nv
|
||||
atomic_op_alias(atomic_or_64_nv,_atomic_or_64_nv)
|
||||
__strong_alias(__sync_or_and_fetch_8,_atomic_or_64_nv)
|
||||
crt_alias(__sync_or_and_fetch_8,_atomic_or_64_nv)
|
||||
|
||||
#if defined(_LP64)
|
||||
#undef atomic_or_ulong_nv
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_swap_32_cas.c,v 1.5 2014/02/21 10:27:34 martin Exp $ */
|
||||
/* $NetBSD: atomic_swap_32_cas.c,v 1.6 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -50,7 +50,7 @@ atomic_op_alias(atomic_swap_32,_atomic_swap_32)
|
||||
#undef atomic_swap_uint
|
||||
atomic_op_alias(atomic_swap_uint,_atomic_swap_32)
|
||||
__strong_alias(_atomic_swap_uint,_atomic_swap_32)
|
||||
__strong_alias(__sync_lock_test_and_set_4,_atomic_swap_32)
|
||||
crt_alias(__sync_lock_test_and_set_4,_atomic_swap_32)
|
||||
#if !defined(_LP64)
|
||||
#undef atomic_swap_ulong
|
||||
atomic_op_alias(atomic_swap_ulong,_atomic_swap_32)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atomic_swap_64_cas.c,v 1.7 2014/02/21 14:42:09 martin Exp $ */
|
||||
/* $NetBSD: atomic_swap_64_cas.c,v 1.8 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -49,7 +49,7 @@ atomic_swap_64(volatile uint64_t *addr, uint64_t new)
|
||||
|
||||
#undef atomic_swap_64
|
||||
atomic_op_alias(atomic_swap_64,_atomic_swap_64)
|
||||
__strong_alias(__sync_lock_test_and_set_8,_atomic_swap_64)
|
||||
crt_alias(__sync_lock_test_and_set_8,_atomic_swap_64)
|
||||
#if defined(_LP64)
|
||||
#undef atomic_swap_ulong
|
||||
atomic_op_alias(atomic_swap_ulong,_atomic_swap_64)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: membar_ops_nop.c,v 1.6 2013/12/07 13:09:55 skrll Exp $ */
|
||||
/* $NetBSD: membar_ops_nop.c,v 1.7 2014/02/22 17:08:30 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@ -54,4 +54,4 @@ atomic_op_alias(membar_consumer,_membar_sync)
|
||||
__strong_alias(_membar_consumer,_membar_sync)
|
||||
#undef membar_sync
|
||||
atomic_op_alias(membar_sync,_membar_sync)
|
||||
atomic_op_alias(__sync_synchronize,_membar_sync)
|
||||
crt_alias(__sync_synchronize,_membar_sync)
|
||||
|
Loading…
Reference in New Issue
Block a user