membar_ops.S revision 1.1
11.1Sad/* $NetBSD: membar_ops.S,v 1.1 2007/11/29 02:01:23 ad Exp $ */ 21.1Sad 31.1Sad/*- 41.1Sad * Copyright (c) 2007 The NetBSD Foundation, Inc. 51.1Sad * All rights reserved. 61.1Sad * 71.1Sad * This code is derived from software contributed to The NetBSD Foundation 81.1Sad * by Jason R. Thorpe, and by Andrew Doran. 91.1Sad * 101.1Sad * Redistribution and use in source and binary forms, with or without 111.1Sad * modification, are permitted provided that the following conditions 121.1Sad * are met: 131.1Sad * 1. Redistributions of source code must retain the above copyright 141.1Sad * notice, this list of conditions and the following disclaimer. 151.1Sad * 2. Redistributions in binary form must reproduce the above copyright 161.1Sad * notice, this list of conditions and the following disclaimer in the 171.1Sad * documentation and/or other materials provided with the distribution. 181.1Sad * 3. All advertising materials mentioning features or use of this software 191.1Sad * must display the following acknowledgement: 201.1Sad * This product includes software developed by the NetBSD 211.1Sad * Foundation, Inc. and its contributors. 221.1Sad * 4. Neither the name of The NetBSD Foundation nor the names of its 231.1Sad * contributors may be used to endorse or promote products derived 241.1Sad * from this software without specific prior written permission. 251.1Sad * 261.1Sad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.1Sad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.1Sad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.1Sad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.1Sad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.1Sad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.1Sad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.1Sad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.1Sad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.1Sad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.1Sad * POSSIBILITY OF SUCH DAMAGE. 371.1Sad */ 381.1Sad 391.1Sad#include "atomic_op_asm.h" 401.1Sad 411.1Sad .text 421.1Sad 431.1Sad/* These assume Total Store Order (TSO) */ 441.1Sad 451.1SadENTRY_NOPROFILE(_membar_producer) 461.1Sad retl 471.1Sad nop 481.1Sad 491.1SadENTRY_NOPROFILE(_membar_sync) 501.1Sad add %sp, -112, %sp 511.1Sad st %g0, [%sp+100] 521.1Sad retl 531.1Sad sub %sp, -112, %sp 541.1Sad 551.1SadATOMIC_OP_ALIAS(membar_producer,_membar_producer) 561.1SadATOMIC_OP_ALIAS(membar_consumer,_membar_consumer) 571.1SadATOMIC_OP_ALIAS(membar_enter,_membar_consumer) 581.1SadSTRONG_ALIAS(_membar_enter,_membar_consumer) 591.1SadATOMIC_OP_ALIAS(membar_exit,_membar_consumer) 601.1SadSTRONG_ALIAS(_membar_exit,_membar_consumer) 611.1SadATOMIC_OP_ALIAS(membar_sync,_membar_consumer) 621.1SadSTRONG_ALIAS(_membar_sync,_membar_consumer) 63