11.2Suwe/* $NetBSD: crtn.S,v 1.2 2012/01/28 12:45:43 uwe Exp $ */ 21.1Sjoerg 31.1Sjoerg/*- 41.1Sjoerg * Copyright (c) 2001 Ross Harvey 51.1Sjoerg * All rights reserved. 61.1Sjoerg * 71.1Sjoerg * Redistribution and use in source and binary forms, with or without 81.1Sjoerg * modification, are permitted provided that the following conditions 91.1Sjoerg * are met: 101.1Sjoerg * 1. Redistributions of source code must retain the above copyright 111.1Sjoerg * notice, this list of conditions and the following disclaimer. 121.1Sjoerg * 2. Redistributions in binary form must reproduce the above copyright 131.1Sjoerg * notice, this list of conditions and the following disclaimer in the 141.1Sjoerg * documentation and/or other materials provided with the distribution. 151.1Sjoerg * 3. All advertising materials mentioning features or use of this software 161.1Sjoerg * must display the following acknowledgement: 171.1Sjoerg * This product includes software developed by the NetBSD 181.1Sjoerg * Foundation, Inc. and its contributors. 191.1Sjoerg * 4. Neither the name of The NetBSD Foundation nor the names of its 201.1Sjoerg * contributors may be used to endorse or promote products derived 211.1Sjoerg * from this software without specific prior written permission. 221.1Sjoerg * 231.1Sjoerg * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 241.1Sjoerg * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 251.1Sjoerg * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 261.1Sjoerg * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 271.1Sjoerg * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 281.1Sjoerg * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 291.1Sjoerg * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 301.1Sjoerg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 311.1Sjoerg * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 321.1Sjoerg * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 331.1Sjoerg * POSSIBILITY OF SUCH DAMAGE. 341.1Sjoerg */ 351.1Sjoerg 361.1Sjoerg#include <machine/asm.h> 371.1Sjoerg 381.2SuweRCSID("$NetBSD: crtn.S,v 1.2 2012/01/28 12:45:43 uwe Exp $") 391.2Suwe 401.2Suwe 411.2Suwe/* 421.2Suwe * Provide function epilogues for the code in .init and .fini sections. 431.2Suwe * Corresponding prologues are in crti.S 441.2Suwe */ 451.1Sjoerg 461.1Sjoerg .section ".init", "ax", @progbits 471.1Sjoerg mov r14, sp 481.1Sjoerg lds.l @sp+, pr 491.1Sjoerg rts 501.1Sjoerg mov.l @sp+, r14 511.1Sjoerg 521.1Sjoerg .section ".fini", "ax", @progbits 531.1Sjoerg mov r14, sp 541.1Sjoerg lds.l @sp+, pr 551.1Sjoerg rts 561.1Sjoerg mov.l @sp+, r14 57