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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [OpenRISC_SIM_GCC/] [arch/] [reset.S] - Blame information for rev 831

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

Line No. Rev Author Line
1 584 jeremybenn
/* Support file for c based tests */
2
#include "spr_defs.h"
3
#include "board.h"
4
#include "mc.h"
5
 
6
        .global         _stack_top
7
        .section        .vectors, "ax"
8
 
9
        .org    0x100
10
_reset_vector:
11
        l.nop
12
        l.nop
13
        l.addi  r2,r0,0x0
14
        l.addi  r3,r0,0x0
15
        l.addi  r4,r0,0x0
16
        l.addi  r5,r0,0x0
17
        l.addi  r6,r0,0x0
18
        l.addi  r7,r0,0x0
19
        l.addi  r8,r0,0x0
20
        l.addi  r9,r0,0x0
21
        l.addi  r10,r0,0x0
22
        l.addi  r11,r0,0x0
23
        l.addi  r12,r0,0x0
24
        l.addi  r13,r0,0x0
25
        l.addi  r14,r0,0x0
26
        l.addi  r15,r0,0x0
27
        l.addi  r16,r0,0x0
28
        l.addi  r17,r0,0x0
29
        l.addi  r18,r0,0x0
30
        l.addi  r19,r0,0x0
31
        l.addi  r20,r0,0x0
32
        l.addi  r21,r0,0x0
33
        l.addi  r22,r0,0x0
34
        l.addi  r23,r0,0x0
35
        l.addi  r24,r0,0x0
36
        l.addi  r25,r0,0x0
37
        l.addi  r26,r0,0x0
38
        l.addi  r27,r0,0x0
39
        l.addi  r28,r0,0x0
40
        l.addi  r29,r0,0x0
41
        l.addi  r30,r0,0x0
42
        l.addi  r31,r0,0x0
43
 
44
        l.movhi r3,hi(_start)
45
        l.ori   r3,r3,lo(_start)
46
        l.jr    r3
47
        l.nop
48
 
49 621 filepang
 
50 584 jeremybenn
.org 0x200
51
_except_200:
52
        l.nop
53 621 filepang
        l.sw    -4(r1), r3
54
        l.addi  r3, r0, 0x200
55 675 filepang
        l.sw    -260(r1), r3
56 621 filepang
        l.lwz   r3, -4(r1)
57
        l.j             vPortMiscIntHandler
58 584 jeremybenn
        l.nop
59
 
60 621 filepang
 
61 584 jeremybenn
.org 0x300
62
_except_300:
63
        l.nop
64 621 filepang
        l.sw    -4(r1), r3
65
        l.addi  r3, r0, 0x300
66 675 filepang
        l.sw    -260(r1), r3
67 621 filepang
        l.lwz   r3, -4(r1)
68
        l.j             vPortMiscIntHandler
69 584 jeremybenn
        l.nop
70
 
71 621 filepang
 
72 584 jeremybenn
.org 0x400
73
_except_400:
74
        l.nop
75 621 filepang
        l.sw    -4(r1), r3
76
        l.addi  r3, r0, 0x400
77 675 filepang
        l.sw    -260(r1), r3
78 621 filepang
        l.lwz   r3, -4(r1)
79
        l.j             vPortMiscIntHandler
80 584 jeremybenn
        l.nop
81
 
82 621 filepang
 
83 584 jeremybenn
.org 0x500
84
_except_500:
85
        l.nop
86 621 filepang
        l.j     vPortTickHandler
87 584 jeremybenn
        l.nop
88
 
89 621 filepang
 
90 584 jeremybenn
.org 0x600
91
_except_600:
92
        l.nop
93 621 filepang
        l.sw    -4(r1), r3
94
        l.addi  r3, r0, 0x600
95 675 filepang
        l.sw    -260(r1), r3
96 621 filepang
        l.lwz   r3, -4(r1)
97
        l.j             vPortMiscIntHandler
98 584 jeremybenn
        l.nop
99
 
100 621 filepang
 
101 584 jeremybenn
.org 0x700
102
_except_700:
103
        l.nop
104 621 filepang
        l.sw    -4(r1), r3
105
        l.addi  r3, r0, 0x700
106 675 filepang
        l.sw    -260(r1), r3
107 621 filepang
        l.lwz   r3, -4(r1)
108
        l.j             vPortMiscIntHandler
109 584 jeremybenn
        l.nop
110
 
111 621 filepang
 
112 584 jeremybenn
.org 0x800
113
_except_800:
114
        l.nop
115 621 filepang
    l.j vPortExtIntHandler
116 584 jeremybenn
    l.nop
117
 
118
 
119
.org 0x900
120
_except_900:
121
        l.nop
122 621 filepang
        l.sw    -4(r1), r3
123
        l.addi  r3, r0, 0x900
124 675 filepang
        l.sw    -260(r1), r3
125 621 filepang
        l.lwz   r3, -4(r1)
126
        l.j             vPortMiscIntHandler
127 584 jeremybenn
        l.nop
128
 
129 621 filepang
 
130 584 jeremybenn
.org 0xa00
131
_except_a00:
132
        l.nop
133 621 filepang
        l.sw    -4(r1), r3
134
        l.addi  r3, r0, 0xa00
135 675 filepang
        l.sw    -260(r1), r3
136 621 filepang
        l.lwz   r3, -4(r1)
137
        l.j             vPortMiscIntHandler
138 584 jeremybenn
        l.nop
139
 
140 621 filepang
 
141 584 jeremybenn
.org 0xb00
142
_except_b00:
143
        l.nop
144 621 filepang
        l.sw    -4(r1), r3
145
        l.addi  r3, r0, 0xb00
146 675 filepang
        l.sw    -260(r1), r3
147 621 filepang
        l.lwz   r3, -4(r1)
148
        l.j             vPortMiscIntHandler
149 584 jeremybenn
        l.nop
150
 
151 621 filepang
 
152 584 jeremybenn
.org 0xc00
153
_except_c00:
154 621 filepang
        .global         vPortSystemCall
155 584 jeremybenn
        l.nop
156 621 filepang
        l.j vPortSystemCall
157 584 jeremybenn
        l.nop
158
 
159
 
160
.org 0xd00
161
_except_d00:
162
        l.nop
163 621 filepang
        l.sw    -4(r1), r3
164
        l.addi  r3, r0, 0xd00
165 675 filepang
        l.sw    -260(r1), r3
166 621 filepang
        l.lwz   r3, -4(r1)
167
        l.j             vPortMiscIntHandler
168 584 jeremybenn
        l.nop
169
 
170 621 filepang
 
171 584 jeremybenn
.org 0xe00
172
_except_e00:
173
        l.nop
174 621 filepang
        l.sw    -4(r1), r3
175
        l.addi  r3, r0, 0xe00
176 675 filepang
        l.sw    -260(r1), r3
177 621 filepang
        l.lwz   r3, -4(r1)
178
        l.j             vPortMiscIntHandler
179 584 jeremybenn
        l.nop
180
 
181 621 filepang
 
182 584 jeremybenn
.org 0xf00
183
_except_f00:
184
        l.nop
185 621 filepang
        l.sw    -4(r1), r3
186
        l.addi  r3, r0, 0xf00
187 675 filepang
        l.sw    -260(r1), r3
188 621 filepang
        l.lwz   r3, -4(r1)
189
        l.j             vPortMiscIntHandler
190 584 jeremybenn
        l.nop
191
 
192
 
193
        .section .text
194
 
195
_start:
196
        /* Set stack pointer */
197
        l.movhi r1, hi(_stack_top)
198
        l.ori   r1, r1, lo(_stack_top)
199
 
200
        /* clear BSS */
201
        l.movhi r2, hi(_bss_beg)
202
        l.ori   r2, r2, lo(_bss_beg)
203
        l.movhi r3, hi(_bss_end)
204
        l.ori   r3, r2, lo(_bss_end)
205
1:
206
        l.sfeq  r2, r3
207
        l.bf    __main
208 621 filepang
        l.nop
209 584 jeremybenn
 
210
        l.sw    0x0(r2), r0
211
        l.addi  r2, r2, 0x4
212
        l.j             1b
213
        l.nop
214
 
215
        /* Jump to main */
216
__main:
217 621 filepang
        l.movhi r2, hi(_main)
218
        l.ori   r2, r2, lo(_main)
219 584 jeremybenn
        l.jr    r2
220
        l.nop

powered by: WebSVN 2.1.0

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