Rev 220 | Rev 431 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
212 | vana | 1 | # |
2 | # Copyright (C) 2005 Jakub Vana |
||
3 | # All rights reserved. |
||
4 | # |
||
5 | # Redistribution and use in source and binary forms, with or without |
||
6 | # modification, are permitted provided that the following conditions |
||
7 | # are met: |
||
8 | # |
||
9 | # - Redistributions of source code must retain the above copyright |
||
10 | # notice, this list of conditions and the following disclaimer. |
||
11 | # - Redistributions in binary form must reproduce the above copyright |
||
12 | # notice, this list of conditions and the following disclaimer in the |
||
13 | # documentation and/or other materials provided with the distribution. |
||
14 | # - The name of the author may not be used to endorse or promote products |
||
15 | # derived from this software without specific prior written permission. |
||
16 | # |
||
17 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
||
18 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
||
19 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||
20 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
||
21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
||
22 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||
23 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||
24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
||
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
27 | # |
||
28 | |||
29 | |||
30 | |||
238 | vana | 31 | |
32 | dump_gregs: |
||
33 | mov r16 = REG_DUMP;; |
||
34 | st8 [r16] = r0;; |
||
35 | add r16 = 8,r16 ;; |
||
36 | st8 [r16] = r1;; |
||
37 | add r16 = 8,r16 ;; |
||
38 | st8 [r16] = r2;; |
||
39 | add r16 = 8,r16 ;; |
||
40 | st8 [r16] = r3;; |
||
41 | add r16 = 8,r16 ;; |
||
42 | st8 [r16] = r4;; |
||
43 | add r16 = 8,r16 ;; |
||
44 | st8 [r16] = r5;; |
||
45 | add r16 = 8,r16 ;; |
||
46 | st8 [r16] = r6;; |
||
47 | add r16 = 8,r16 ;; |
||
48 | st8 [r16] = r7;; |
||
49 | add r16 = 8,r16 ;; |
||
50 | st8 [r16] = r8;; |
||
51 | add r16 = 8,r16 ;; |
||
52 | st8 [r16] = r9;; |
||
53 | add r16 = 8,r16 ;; |
||
54 | st8 [r16] = r10;; |
||
55 | add r16 = 8,r16 ;; |
||
56 | st8 [r16] = r11;; |
||
57 | add r16 = 8,r16 ;; |
||
58 | st8 [r16] = r12;; |
||
59 | add r16 = 8,r16 ;; |
||
60 | st8 [r16] = r13;; |
||
61 | add r16 = 8,r16 ;; |
||
62 | st8 [r16] = r14;; |
||
63 | add r16 = 8,r16 ;; |
||
64 | st8 [r16] = r15;; |
||
65 | add r16 = 8,r16 ;; |
||
66 | |||
67 | bsw.1;; |
||
68 | mov r15 = r16;; |
||
69 | bsw.0;; |
||
70 | st8 [r16] = r15;; |
||
71 | add r16 = 8,r16 ;; |
||
72 | bsw.1;; |
||
73 | mov r15 = r17;; |
||
74 | bsw.0;; |
||
75 | st8 [r16] = r15;; |
||
76 | add r16 = 8,r16 ;; |
||
77 | bsw.1;; |
||
78 | mov r15 = r18;; |
||
79 | bsw.0;; |
||
80 | st8 [r16] = r15;; |
||
81 | add r16 = 8,r16 ;; |
||
82 | bsw.1;; |
||
83 | mov r15 = r19;; |
||
84 | bsw.0;; |
||
85 | st8 [r16] = r15;; |
||
86 | add r16 = 8,r16 ;; |
||
87 | bsw.1;; |
||
88 | mov r15 = r20;; |
||
89 | bsw.0;; |
||
90 | st8 [r16] = r15;; |
||
91 | add r16 = 8,r16 ;; |
||
92 | bsw.1;; |
||
93 | mov r15 = r21;; |
||
94 | bsw.0;; |
||
95 | st8 [r16] = r15;; |
||
96 | add r16 = 8,r16 ;; |
||
97 | bsw.1;; |
||
98 | mov r15 = r22;; |
||
99 | bsw.0;; |
||
100 | st8 [r16] = r15;; |
||
101 | add r16 = 8,r16 ;; |
||
102 | bsw.1;; |
||
103 | mov r15 = r23;; |
||
104 | bsw.0;; |
||
105 | st8 [r16] = r15;; |
||
106 | add r16 = 8,r16 ;; |
||
107 | bsw.1;; |
||
108 | mov r15 = r24;; |
||
109 | bsw.0;; |
||
110 | st8 [r16] = r15;; |
||
111 | add r16 = 8,r16 ;; |
||
112 | bsw.1;; |
||
113 | mov r15 = r25;; |
||
114 | bsw.0;; |
||
115 | st8 [r16] = r15;; |
||
116 | add r16 = 8,r16 ;; |
||
117 | bsw.1;; |
||
118 | mov r15 = r26;; |
||
119 | bsw.0;; |
||
120 | st8 [r16] = r15;; |
||
121 | add r16 = 8,r16 ;; |
||
122 | bsw.1;; |
||
123 | mov r15 = r27;; |
||
124 | bsw.0;; |
||
125 | st8 [r16] = r15;; |
||
126 | add r16 = 8,r16 ;; |
||
127 | bsw.1;; |
||
128 | mov r15 = r28;; |
||
129 | bsw.0;; |
||
130 | st8 [r16] = r15;; |
||
131 | add r16 = 8,r16 ;; |
||
132 | bsw.1;; |
||
133 | mov r15 = r29;; |
||
134 | bsw.0;; |
||
135 | st8 [r16] = r15;; |
||
136 | add r16 = 8,r16 ;; |
||
137 | bsw.1;; |
||
138 | mov r15 = r30;; |
||
139 | bsw.0;; |
||
140 | st8 [r16] = r15;; |
||
141 | add r16 = 8,r16 ;; |
||
142 | bsw.1;; |
||
143 | mov r15 = r31;; |
||
144 | bsw.0;; |
||
145 | st8 [r16] = r15;; |
||
146 | add r16 = 8,r16 ;; |
||
147 | |||
148 | |||
149 | st8 [r16] = r32;; |
||
150 | add r16 = 8,r16 ;; |
||
151 | st8 [r16] = r33;; |
||
152 | add r16 = 8,r16 ;; |
||
153 | st8 [r16] = r34;; |
||
154 | add r16 = 8,r16 ;; |
||
155 | st8 [r16] = r35;; |
||
156 | add r16 = 8,r16 ;; |
||
157 | st8 [r16] = r36;; |
||
158 | add r16 = 8,r16 ;; |
||
159 | st8 [r16] = r37;; |
||
160 | add r16 = 8,r16 ;; |
||
161 | st8 [r16] = r38;; |
||
162 | add r16 = 8,r16 ;; |
||
163 | st8 [r16] = r39;; |
||
164 | add r16 = 8,r16 ;; |
||
165 | st8 [r16] = r40;; |
||
166 | add r16 = 8,r16 ;; |
||
167 | st8 [r16] = r41;; |
||
168 | add r16 = 8,r16 ;; |
||
169 | st8 [r16] = r42;; |
||
170 | add r16 = 8,r16 ;; |
||
171 | st8 [r16] = r43;; |
||
172 | add r16 = 8,r16 ;; |
||
173 | st8 [r16] = r44;; |
||
174 | add r16 = 8,r16 ;; |
||
175 | st8 [r16] = r45;; |
||
176 | add r16 = 8,r16 ;; |
||
177 | st8 [r16] = r46;; |
||
178 | add r16 = 8,r16 ;; |
||
179 | st8 [r16] = r47;; |
||
180 | add r16 = 8,r16 ;; |
||
181 | st8 [r16] = r48;; |
||
182 | add r16 = 8,r16 ;; |
||
183 | st8 [r16] = r49;; |
||
184 | add r16 = 8,r16 ;; |
||
185 | st8 [r16] = r50;; |
||
186 | add r16 = 8,r16 ;; |
||
187 | st8 [r16] = r51;; |
||
188 | add r16 = 8,r16 ;; |
||
189 | st8 [r16] = r52;; |
||
190 | add r16 = 8,r16 ;; |
||
191 | st8 [r16] = r53;; |
||
192 | add r16 = 8,r16 ;; |
||
193 | st8 [r16] = r54;; |
||
194 | add r16 = 8,r16 ;; |
||
195 | st8 [r16] = r55;; |
||
196 | add r16 = 8,r16 ;; |
||
197 | st8 [r16] = r56;; |
||
198 | add r16 = 8,r16 ;; |
||
199 | st8 [r16] = r57;; |
||
200 | add r16 = 8,r16 ;; |
||
201 | st8 [r16] = r58;; |
||
202 | add r16 = 8,r16 ;; |
||
203 | st8 [r16] = r59;; |
||
204 | add r16 = 8,r16 ;; |
||
205 | st8 [r16] = r60;; |
||
206 | add r16 = 8,r16 ;; |
||
207 | st8 [r16] = r61;; |
||
208 | add r16 = 8,r16 ;; |
||
209 | st8 [r16] = r62;; |
||
210 | add r16 = 8,r16 ;; |
||
211 | st8 [r16] = r63;; |
||
212 | add r16 = 8,r16 ;; |
||
213 | |||
214 | |||
215 | |||
216 | st8 [r16] = r64;; |
||
217 | add r16 = 8,r16 ;; |
||
218 | st8 [r16] = r65;; |
||
219 | add r16 = 8,r16 ;; |
||
220 | st8 [r16] = r66;; |
||
221 | add r16 = 8,r16 ;; |
||
222 | st8 [r16] = r67;; |
||
223 | add r16 = 8,r16 ;; |
||
224 | st8 [r16] = r68;; |
||
225 | add r16 = 8,r16 ;; |
||
226 | st8 [r16] = r69;; |
||
227 | add r16 = 8,r16 ;; |
||
228 | st8 [r16] = r70;; |
||
229 | add r16 = 8,r16 ;; |
||
230 | st8 [r16] = r71;; |
||
231 | add r16 = 8,r16 ;; |
||
232 | st8 [r16] = r72;; |
||
233 | add r16 = 8,r16 ;; |
||
234 | st8 [r16] = r73;; |
||
235 | add r16 = 8,r16 ;; |
||
236 | st8 [r16] = r74;; |
||
237 | add r16 = 8,r16 ;; |
||
238 | st8 [r16] = r75;; |
||
239 | add r16 = 8,r16 ;; |
||
240 | st8 [r16] = r76;; |
||
241 | add r16 = 8,r16 ;; |
||
242 | st8 [r16] = r77;; |
||
243 | add r16 = 8,r16 ;; |
||
244 | st8 [r16] = r78;; |
||
245 | add r16 = 8,r16 ;; |
||
246 | st8 [r16] = r79;; |
||
247 | add r16 = 8,r16 ;; |
||
248 | st8 [r16] = r80;; |
||
249 | add r16 = 8,r16 ;; |
||
250 | st8 [r16] = r81;; |
||
251 | add r16 = 8,r16 ;; |
||
252 | st8 [r16] = r82;; |
||
253 | add r16 = 8,r16 ;; |
||
254 | st8 [r16] = r83;; |
||
255 | add r16 = 8,r16 ;; |
||
256 | st8 [r16] = r84;; |
||
257 | add r16 = 8,r16 ;; |
||
258 | st8 [r16] = r85;; |
||
259 | add r16 = 8,r16 ;; |
||
260 | st8 [r16] = r86;; |
||
261 | add r16 = 8,r16 ;; |
||
262 | st8 [r16] = r87;; |
||
263 | add r16 = 8,r16 ;; |
||
264 | st8 [r16] = r88;; |
||
265 | add r16 = 8,r16 ;; |
||
266 | st8 [r16] = r89;; |
||
267 | add r16 = 8,r16 ;; |
||
268 | st8 [r16] = r90;; |
||
269 | add r16 = 8,r16 ;; |
||
270 | st8 [r16] = r91;; |
||
271 | add r16 = 8,r16 ;; |
||
272 | st8 [r16] = r92;; |
||
273 | add r16 = 8,r16 ;; |
||
274 | st8 [r16] = r93;; |
||
275 | add r16 = 8,r16 ;; |
||
276 | st8 [r16] = r94;; |
||
277 | add r16 = 8,r16 ;; |
||
278 | st8 [r16] = r95;; |
||
279 | add r16 = 8,r16 ;; |
||
280 | |||
281 | |||
282 | |||
283 | st8 [r16] = r96;; |
||
284 | add r16 = 8,r16 ;; |
||
285 | st8 [r16] = r97;; |
||
286 | add r16 = 8,r16 ;; |
||
287 | st8 [r16] = r98;; |
||
288 | add r16 = 8,r16 ;; |
||
289 | st8 [r16] = r99;; |
||
290 | add r16 = 8,r16 ;; |
||
291 | st8 [r16] = r100;; |
||
292 | add r16 = 8,r16 ;; |
||
293 | st8 [r16] = r101;; |
||
294 | add r16 = 8,r16 ;; |
||
295 | st8 [r16] = r102;; |
||
296 | add r16 = 8,r16 ;; |
||
297 | st8 [r16] = r103;; |
||
298 | add r16 = 8,r16 ;; |
||
299 | st8 [r16] = r104;; |
||
300 | add r16 = 8,r16 ;; |
||
301 | st8 [r16] = r105;; |
||
302 | add r16 = 8,r16 ;; |
||
303 | st8 [r16] = r106;; |
||
304 | add r16 = 8,r16 ;; |
||
305 | st8 [r16] = r107;; |
||
306 | add r16 = 8,r16 ;; |
||
307 | st8 [r16] = r108;; |
||
308 | add r16 = 8,r16 ;; |
||
309 | st8 [r16] = r109;; |
||
310 | add r16 = 8,r16 ;; |
||
311 | st8 [r16] = r110;; |
||
312 | add r16 = 8,r16 ;; |
||
313 | st8 [r16] = r111;; |
||
314 | add r16 = 8,r16 ;; |
||
315 | st8 [r16] = r112;; |
||
316 | add r16 = 8,r16 ;; |
||
317 | st8 [r16] = r113;; |
||
318 | add r16 = 8,r16 ;; |
||
319 | st8 [r16] = r114;; |
||
320 | add r16 = 8,r16 ;; |
||
321 | st8 [r16] = r115;; |
||
322 | add r16 = 8,r16 ;; |
||
323 | st8 [r16] = r116;; |
||
324 | add r16 = 8,r16 ;; |
||
325 | st8 [r16] = r117;; |
||
326 | add r16 = 8,r16 ;; |
||
327 | st8 [r16] = r118;; |
||
328 | add r16 = 8,r16 ;; |
||
329 | st8 [r16] = r119;; |
||
330 | add r16 = 8,r16 ;; |
||
331 | st8 [r16] = r120;; |
||
332 | add r16 = 8,r16 ;; |
||
333 | st8 [r16] = r121;; |
||
334 | add r16 = 8,r16 ;; |
||
335 | st8 [r16] = r122;; |
||
336 | add r16 = 8,r16 ;; |
||
337 | st8 [r16] = r123;; |
||
338 | add r16 = 8,r16 ;; |
||
339 | st8 [r16] = r124;; |
||
340 | add r16 = 8,r16 ;; |
||
341 | st8 [r16] = r125;; |
||
342 | add r16 = 8,r16 ;; |
||
343 | st8 [r16] = r126;; |
||
344 | add r16 = 8,r16 ;; |
||
345 | st8 [r16] = r127;; |
||
346 | add r16 = 8,r16 ;; |
||
347 | |||
348 | |||
349 | |||
350 | br.ret.sptk.many b0;; |
||
351 | |||
352 | |||
353 | |||
354 | |||
355 | |||
212 | vana | 356 | .macro Handler o h |
357 | .org IVT + \o |
||
358 | br \h;; |
||
359 | .endm |
||
360 | |||
220 | vana | 361 | .macro Handler2 o |
362 | .org IVT + \o |
||
238 | vana | 363 | br.call.sptk.many b0 = dump_gregs;; |
364 | mov r16 = \o ;; |
||
365 | bsw.1;; |
||
220 | vana | 366 | br universal_handler;; |
367 | .endm |
||
212 | vana | 368 | |
369 | |||
220 | vana | 370 | |
212 | vana | 371 | .global IVT |
372 | .align 32768 |
||
373 | IVT: |
||
374 | |||
220 | vana | 375 | |
376 | Handler2 0x0000 |
||
377 | Handler2 0x0400 |
||
378 | Handler2 0x0800 |
||
379 | Handler2 0x0c00 |
||
380 | Handler2 0x1000 |
||
381 | Handler2 0x1400 |
||
382 | Handler2 0x1800 |
||
383 | Handler2 0x1c00 |
||
384 | Handler2 0x2000 |
||
385 | Handler2 0x2400 |
||
386 | Handler2 0x2800 |
||
212 | vana | 387 | Handler 0x2c00 break_instruction |
220 | vana | 388 | Handler2 0x3000 |
389 | Handler2 0x3400 |
||
390 | Handler2 0x3800 |
||
391 | Handler2 0x3c00 |
||
392 | Handler2 0x4000 |
||
393 | Handler2 0x4400 |
||
394 | Handler2 0x4800 |
||
395 | Handler2 0x4c00 |
||
396 | |||
397 | Handler2 0x5000 |
||
398 | Handler2 0x5100 |
||
399 | Handler2 0x5200 |
||
400 | Handler2 0x5300 |
||
238 | vana | 401 | #Handler 0x5400 general_exception |
402 | Handler2 0x5400 |
||
220 | vana | 403 | Handler2 0x5500 |
404 | Handler2 0x5600 |
||
405 | Handler2 0x5700 |
||
406 | Handler2 0x5800 |
||
407 | Handler2 0x5900 |
||
408 | Handler2 0x5a00 |
||
409 | Handler2 0x5b00 |
||
410 | Handler2 0x5c00 |
||
411 | Handler2 0x5d00 |
||
412 | Handler2 0x5e00 |
||
413 | Handler2 0x5f00 |
||
212 | vana | 414 | |
220 | vana | 415 | Handler2 0x6000 |
416 | Handler2 0x6100 |
||
417 | Handler2 0x6200 |
||
418 | Handler2 0x6300 |
||
419 | Handler2 0x6400 |
||
420 | Handler2 0x6500 |
||
421 | Handler2 0x6600 |
||
422 | Handler2 0x6700 |
||
423 | Handler2 0x6800 |
||
424 | Handler2 0x6900 |
||
425 | Handler2 0x6a00 |
||
426 | Handler2 0x6b00 |
||
427 | Handler2 0x6c00 |
||
428 | Handler2 0x6d00 |
||
429 | Handler2 0x6e00 |
||
430 | Handler2 0x6f00 |
||
212 | vana | 431 | |
220 | vana | 432 | Handler2 0x7000 |
433 | Handler2 0x7100 |
||
434 | Handler2 0x7200 |
||
435 | Handler2 0x7300 |
||
436 | Handler2 0x7400 |
||
437 | Handler2 0x7500 |
||
438 | Handler2 0x7600 |
||
439 | Handler2 0x7700 |
||
440 | Handler2 0x7800 |
||
441 | Handler2 0x7900 |
||
442 | Handler2 0x7a00 |
||
443 | Handler2 0x7b00 |
||
444 | Handler2 0x7c00 |
||
445 | Handler2 0x7d00 |
||
446 | Handler2 0x7e00 |
||
447 | Handler2 0x7f00 |
||
212 | vana | 448 | |
449 | |||
220 | vana | 450 | |
451 | |||
452 | |||
453 | |||
454 | |||
455 | |||
212 | vana | 456 | .align 32768 |
238 | vana | 457 | .global REG_DUMP |
458 | |||
459 | REG_DUMP: |
||
460 | .space 128*8 |
||
461 |