OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [newlib/] [libc/] [sys/] [sh/] [crt0.S] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
        .section .text
2
        .global start
3
start:
4
        mov.l   stack_k,r15
5
 
6
        ! zero out bss
7
        mov.l   edata_k,r0
8
        mov.l   end_k,r1
9
        mov     #0,r2
10
start_l:
11
         mov.l  r2,@r0
12
        add     #4,r0
13
        cmp/ge  r0,r1
14
        bt      start_l
15
 
16
#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
17
        mov.l set_fpscr_k, r1
18
        jsr @r1
19
        mov #0,r4
20
        lds r3,fpscr
21
#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
22
 
23
        ! call the mainline
24
        mov.l   main_k,r0
25
        jsr     @r0
26
        or      r0,r0
27
 
28
        ! call exit
29
        mov     r0,r4
30
        mov.l   exit_k,r0
31
        jsr     @r0
32
        or      r0,r0
33
 
34
        .align 2
35
#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
36
set_fpscr_k:
37
        .long   ___set_fpscr
38
#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
39
stack_k:
40
        .long   _stack
41
edata_k:
42
        .long   _edata
43
end_k:
44
        .long   _end
45
main_k:
46
        .long   _main
47
exit_k:
48
        .long   _exit
49
 
50
#ifdef __ELF__
51
        .section .stack,"aw"
52
#else
53
        .section .stack
54
#endif
55
_stack: .long   0xdeaddead

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.