1276305Sngie/* $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */ 2236769Sobrien 3236769Sobrien/*- 4236769Sobrien * Copyright (c) 2001 Ross Harvey 5236769Sobrien * All rights reserved. 6236769Sobrien * 7236769Sobrien * Redistribution and use in source and binary forms, with or without 8236769Sobrien * modification, are permitted provided that the following conditions 9236769Sobrien * are met: 10236769Sobrien * 1. Redistributions of source code must retain the above copyright 11236769Sobrien * notice, this list of conditions and the following disclaimer. 12236769Sobrien * 2. Redistributions in binary form must reproduce the above copyright 13236769Sobrien * notice, this list of conditions and the following disclaimer in the 14236769Sobrien * documentation and/or other materials provided with the distribution. 15236769Sobrien * 3. All advertising materials mentioning features or use of this software 16236769Sobrien * must display the following acknowledgement: 17236769Sobrien * This product includes software developed by the NetBSD 18236769Sobrien * Foundation, Inc. and its contributors. 19236769Sobrien * 4. Neither the name of The NetBSD Foundation nor the names of its 20236769Sobrien * contributors may be used to endorse or promote products derived 21236769Sobrien * from this software without specific prior written permission. 22236769Sobrien * 23236769Sobrien * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 24236769Sobrien * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 25236769Sobrien * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26236769Sobrien * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 27236769Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28236769Sobrien * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29236769Sobrien * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30236769Sobrien * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31236769Sobrien * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32236769Sobrien * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33236769Sobrien * POSSIBILITY OF SUCH DAMAGE. 34236769Sobrien */ 35236769Sobrien 36276305Sngie#include <machine/asm.h> 37236769Sobrien 38236769SobrienRCSID("$NetBSD: crtn.S,v 1.1 2010/08/07 18:01:34 joerg Exp $") 39236769Sobrien 40236769Sobrien 41236769Sobrien/* 42236769Sobrien * Provide function epilogues for the code in .init and .fini sections. 43276305Sngie * Corresponding prologues are in crti.S 44236769Sobrien */ 45236769Sobrien 46236769Sobrien .section ".init", "ax", @progbits 47236769Sobrien mov r14, sp 48236769Sobrien lds.l @sp+, pr 49236769Sobrien rts 50236769Sobrien mov.l @sp+, r14 51236769Sobrien 52236769Sobrien .section ".fini", "ax", @progbits 53236769Sobrien mov r14, sp 54236769Sobrien lds.l @sp+, pr 55236769Sobrien rts 56236769Sobrien mov.l @sp+, r14 57236769Sobrien