1 /* crt0.S -- startup file for moxie
3 * Copyright (c) 2008, 2009, 2014 Anthony Green
5 * The authors hereby grant permission to use, copy, modify, distribute,
6 * and license this software and its documentation for any purpose, provided
7 * that existing copyright notices are retained in all copies and that this
8 * notice is included verbatim in any distributions. No written agreement,
9 * license, or royalty fee is required for any of the authorized uses.
10 * Modifications to this software may be copyrighted by their authors
11 * and need not follow the licensing terms described here, provided that
12 * the new terms are clearly indicated on the first page of each file where
19 .type __start,@function
22 ldi.l $sp, _stack /* set the top of stack */
23 xor $fp, $fp /* zero fp to allow unwinders to stop */
25 /* zero the bss area */
26 ldi.l $r0, __bss_start__
28 ldi.l $r2, __bss_end__
32 /* Call _init to invoke static constructors, etc. */
35 /* Call _fini at exit time for static destructors. */
39 /* Set argc and argv. These are populated by the simulator. */
47 .size __start,(.Lend-__start)