1 1.2 joerg /* $NetBSD: crt0.S,v 1.2 2018/11/26 17:37:46 joerg Exp $ */ 2 1.1 martin 3 1.1 martin /* 4 1.1 martin * Copyright (c) 1998 Christos Zoulas 5 1.1 martin * Copyright (c) 1995 Christopher G. Demetriou 6 1.1 martin * All rights reserved. 7 1.1 martin * 8 1.1 martin * Redistribution and use in source and binary forms, with or without 9 1.1 martin * modification, are permitted provided that the following conditions 10 1.1 martin * are met: 11 1.1 martin * 1. Redistributions of source code must retain the above copyright 12 1.1 martin * notice, this list of conditions and the following disclaimer. 13 1.1 martin * 2. Redistributions in binary form must reproduce the above copyright 14 1.1 martin * notice, this list of conditions and the following disclaimer in the 15 1.1 martin * documentation and/or other materials provided with the distribution. 16 1.1 martin * 3. All advertising materials mentioning features or use of this software 17 1.1 martin * must display the following acknowledgement: 18 1.1 martin * This product includes software developed for the 19 1.1 martin * NetBSD Project. See http://www.NetBSD.org/ for 20 1.1 martin * information about NetBSD. 21 1.1 martin * 4. The name of the author may not be used to endorse or promote products 22 1.1 martin * derived from this software without specific prior written permission. 23 1.1 martin * 24 1.1 martin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 25 1.1 martin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 26 1.1 martin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 1.1 martin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 28 1.1 martin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 1.1 martin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 1.1 martin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 1.1 martin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 1.1 martin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 1.1 martin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 1.1 martin * 35 1.1 martin * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 36 1.1 martin */ 37 1.1 martin 38 1.1 martin #include <machine/asm.h> 39 1.1 martin 40 1.2 joerg RCSID("$NetBSD: crt0.S,v 1.2 2018/11/26 17:37:46 joerg Exp $") 41 1.1 martin 42 1.1 martin STRONG_ALIAS(_start,__start) 43 1.1 martin 44 1.1 martin .align 4 45 1.1 martin .register %g3,#scratch 46 1.1 martin .register %g2,#scratch 47 1.1 martin 48 1.1 martin ! called with: 49 1.1 martin ! %g3 = cleanup 50 1.1 martin ! %g2 = obj 51 1.1 martin ! %g1 = ps_strings 52 1.2 joerg ! call: ___start(cleanup, ps_strings) 53 1.1 martin _ENTRY(__start) 54 1.1 martin clr %fp 55 1.1 martin clr %g4 ! data base for some memory models 56 1.1 martin mov %g3, %o0 57 1.1 martin ba,pt %icc,___start 58 1.2 joerg mov %g1, %o1 59 1.1 martin 60