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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [score/] [crti.asm] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
# crti.asm for Sunplus S+CORE
2
#
3
#   Copyright (C) 2005 Free Software Foundation, Inc.
4
#
5
# This file is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by the
7
# Free Software Foundation; either version 2, or (at your option) any
8
# later version.
9
#
10
# In addition to the permissions in the GNU General Public License, the
11
# Free Software Foundation gives you unlimited permission to link the
12
# compiled version of this file with other programs, and to distribute
13
# those programs without any restriction coming from the use of this
14
# file.  (The General Public License restrictions do apply in other
15
# respects; for example, they cover modification of the file, and
16
# distribution when not linked into another program.)
17
#
18
# This file is distributed in the hope that it will be useful, but
19
# WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21
# General Public License for more details.
22
#
23
# You should have received a copy of the GNU General Public License
24
# along with GCC; see the file COPYING.  If not, write to the Free
25
# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
26
# 02110-1301, USA.
27
#
28
#   As a special exception, if you link this library with files
29
#   compiled with GCC to produce an executable, this does not cause
30
#   the resulting executable to be covered by the GNU General Public License.
31
#   This exception does not however invalidate any other reasons why
32
#   the executable file might be covered by the GNU General Public License.
33
#
34
 
35
# This file makes a stack frame for the contents of the .init and
36
# .fini sections.
37
 
38
#ifndef __pic__
39
.section .init, "ax", @progbits
40
        .weak   _start
41
        .ent    _start
42
        .frame  r0, 0, r3, 0
43
        .mask   0x00000000, 0
44
_start:
45
        la      r28, _gp
46
        la      r8, __bss_start
47
        la      r9, __bss_end__
48
        sub!    r9, r8
49
        srli!   r9, 2
50
        addi    r9, -1
51
        mtsr    r9, sr0
52
        li      r9, 0
53
1:
54
        sw      r9, [r8]+, 4
55
        bcnz    1b
56
        la      r0, _stack
57
        jl      _init
58
        la      r4, _end
59
        jl      _init_argv
60
        jl      exit
61
        .end    _start
62
 
63
        .weak   _init_argv
64
        .ent
65
        .frame  r0, 0, r3, 0
66
        .mask   0x00000000, 0
67
_init_argv:
68
        ldiu!   r4, 0
69
        ldiu!   r5, 0
70
        j       main
71
        .end    _init_argv
72
 
73
        .globl  _init
74
        .type   _init, %function
75
_init:
76
        addi    r0, -32
77
        sw      r3, [r0, 20]
78
 
79
        .section .fini, "ax", @progbits
80
        .globl  _fini
81
        .type   _fini, %function
82
_fini:
83
        addi    r0, -32
84
        sw      r3, [r0, 20]
85
#else
86
.section .init, "ax", @progbits
87
        .set    pic
88
        .weak   _start
89
        .ent    _start
90
        .frame  r0, 0, r3, 0
91
        .mask   0x00000000,0
92
_start:
93
        la      r28, _gp
94
        la      r8, __bss_start
95
        la      r9, __bss_end__
96
        sub!    r9, r8
97
        srli!   r9, 2
98
        addi    r9, -1
99
        mtsr    r9, sr0
100
        li      r9, 0
101
1:
102
        sw      r9, [r8]+, 4
103
        bcnz    1b
104
        la      r0, _stack
105
        ldiu!   r4, 0
106
        ldiu!   r5, 0
107
        la      r29, main
108
        brl     r29
109
        la      r29, exit
110
        brl     r29
111
        .end    _start
112
 
113
        .weak   _init_argv
114
        .ent
115
        .frame  r0, 0, r3, 0
116
        .mask   0x00000000, 0
117
_init_argv:
118
        ldiu!   r4, 0
119
        ldiu!   r5, 0
120
        j       main
121
        .end    _init_argv
122
 
123
        .globl  _init
124
        .type   _init, %function
125
_init:
126
        addi    r0, -32
127
        sw      r3, [r0, 20]
128
 
129
.section .fini, "ax", @progbits
130
        .globl  _fini
131
        .type   _fini, %function
132
_fini:
133
        addi    r0, -32
134
        sw      r3, [r0, 20]
135
 
136
#endif
137
 
138
 

powered by: WebSVN 2.1.0

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