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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [sysnecv850/] [crt0.S] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
# NEC V850 startup code
2
 
3
        .section .text
4
        .global _start
5
 
6
_start:
7
 
8
#if defined __v850e__
9
 
10
        movea   255,            r0,     r20
11
        mov     65535,          r21
12
        mov     hilo(_stack),   sp
13
        mov     hilo(__ep),     ep
14
        mov     hilo(__gp),     gp
15
        mov     hilo(__ctbp),   r6
16
        ldsr    r6,             ctbp
17
        mov     hilo(_edata),   r6
18
        mov     hilo(_end),     r7
19
.L0:
20
        st.w    r0,             0[r6]
21
        addi    4,              r6,     r6
22
        cmp     r7,             r6
23
        bl      .L0
24
.L1:
25
        jarl    ___main,        r31
26
        addi    -16,            sp,     sp
27
        mov     0,              r6
28
        mov     0,              r7
29
        mov     0,              r8
30
        jarl    _main,          r31
31
        mov     r10,            r6
32
        jarl    _exit,          r31
33
 
34
# else
35
        movea   255,            r0,     r20
36
        mov     r0,             r21
37
        ori     65535,          r0,     r21
38
        movhi   hi(_stack),     r0,     sp
39
        movea   lo(_stack),     sp,     sp
40
        movhi   hi(__ep),       r0,     ep
41
        movea   lo(__ep),       ep,     ep
42
        movhi   hi(__gp),       r0,     gp
43
        movea   lo(__gp),       gp,     gp
44
 
45
        movhi   hi(_edata),     r0,     r6
46
        movea   lo(_edata),     r6,     r6
47
        movhi   hi(_end),       r0,     r7
48
        movea   lo(_end),       r7,     r7
49
.L0:
50
        st.b    r0,             0[r6]
51
        addi    1,              r6,     r6
52
        cmp     r7,             r6
53
        bl      .L0
54
.L1:
55
        jarl    ___main,        r31
56
        addi    -16,            sp,     sp
57
        mov     0,              r6
58
        mov     0,              r7
59
        mov     0,              r8
60
        jarl    _main,          r31
61
        mov     r10,            r6
62
        jarl    _exit,          r31
63
# endif
64
 
65
        .section .stack
66
_stack: .long   1
67
 
68
        .section .data
69
        .global ___dso_handle
70
        .weak   ___dso_handle
71
___dso_handle:
72
        .long   0

powered by: WebSVN 2.1.0

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