xref: /netbsd-src/common/lib/libc/arch/hppa/atomic/membar_ops.S (revision 4f8ce3b31dd3bccb2f78a8118c558aacc733ac7d)
1*4f8ce3b3Sriastradh/*	$NetBSD: membar_ops.S,v 1.3 2022/04/09 23:32:51 riastradh Exp $	*/
2a673bf60Sskrll
3a673bf60Sskrll/*-
4a673bf60Sskrll * Copyright (c) 2007 The NetBSD Foundation, Inc.
5a673bf60Sskrll * All rights reserved.
6a673bf60Sskrll *
7a673bf60Sskrll * This code is derived from software contributed to The NetBSD Foundation
8a673bf60Sskrll * by Jason R. Thorpe, and by Andrew Doran.
9a673bf60Sskrll *
10a673bf60Sskrll * Redistribution and use in source and binary forms, with or without
11a673bf60Sskrll * modification, are permitted provided that the following conditions
12a673bf60Sskrll * are met:
13a673bf60Sskrll * 1. Redistributions of source code must retain the above copyright
14a673bf60Sskrll *    notice, this list of conditions and the following disclaimer.
15a673bf60Sskrll * 2. Redistributions in binary form must reproduce the above copyright
16a673bf60Sskrll *    notice, this list of conditions and the following disclaimer in the
17a673bf60Sskrll *    documentation and/or other materials provided with the distribution.
18a673bf60Sskrll *
19a673bf60Sskrll * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20a673bf60Sskrll * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21a673bf60Sskrll * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22a673bf60Sskrll * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23a673bf60Sskrll * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24a673bf60Sskrll * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25a673bf60Sskrll * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26a673bf60Sskrll * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27a673bf60Sskrll * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28a673bf60Sskrll * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29a673bf60Sskrll * POSSIBILITY OF SUCH DAMAGE.
30a673bf60Sskrll */
31a673bf60Sskrll
32a673bf60Sskrll#include "atomic_op_asm.h"
33a673bf60Sskrll
34*4f8ce3b3SriastradhRCSID("$NetBSD: membar_ops.S,v 1.3 2022/04/09 23:32:51 riastradh Exp $")
35a673bf60Sskrll
36a673bf60Sskrll	.text
37a673bf60Sskrll
38*4f8ce3b3SriastradhLEAF_ENTRY(_membar_sync)
39a673bf60Sskrll	sync
40a673bf60Sskrll	nop
41a673bf60Sskrll	nop
42a673bf60Sskrll	nop
43a673bf60Sskrll	nop
44a673bf60Sskrll	nop
45a673bf60Sskrll	bv	%r0(%rp)
46a673bf60Sskrll	 nop
47*4f8ce3b3SriastradhEXIT(_membar_sync)
48*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_sync,_membar_sync)
49a673bf60Sskrll
50*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_producer,_membar_sync)
51*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_producer,_membar_sync)
52*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_consumer,_membar_sync)
53*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_consumer,_membar_sync)
54*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_acquire,_membar_sync)
55*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_acquire,_membar_sync)
56*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_release,_membar_sync)
57*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_release,_membar_sync)
58*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_enter,_membar_sync)
59*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_enter,_membar_sync)
60*4f8ce3b3SriastradhATOMIC_OP_ALIAS(membar_exit,_membar_sync)
61*4f8ce3b3SriastradhSTRONG_ALIAS(_membar_exit,_membar_sync)
62