source: trunk/libs/newlib/src/libgloss/ft32/crt0.S @ 608

Last change on this file since 608 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.5 KB
RevLine 
[444]1/* crt0.S -- startup file for FT32
2 *
3 * Copyright (c) 2015  FTDI
4 *
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
13 * they apply.
14 */
15
16        .globl        __start
17        .weak        _start
18        .text
19        .type        __start,@function
20
21__start:
22_start:
23
24    jmp   truestart
25    jmp   truestart
26
27    reti
28    reti
29    reti
30    reti
31    reti
32    reti
33    reti
34    reti
35    reti
36    reti
37    reti
38    reti
39    reti
40    reti
41    reti
42    reti
43    reti
44    reti
45    reti
46    reti
47    reti
48    reti
49    reti
50    reti
51    reti
52    reti
53    reti
54    reti
55    reti
56    reti
57    reti
58    reti
59
60truestart:
61        ldk.l   $sp, 0xfffc        /* set the top of stack */
62        ldk.l   $fp,0           /* zero fp to allow unwinders to stop */
63
64        /* Set argc and argv to zero */
65        ldk.l        $r0, 0
66        ldk.l        $r1, 0
67
68        sub.l   $sp,$sp,24    # room for the args to main
69        call        main
70        call        exit
71
72.Lend:
73        .size        __start,(.Lend-__start)
Note: See TracBrowser for help on using the repository browser.