source: rtems/c/src/lib/libbsp/powerpc/support/old_exception_processing/cpu_asm.S @ 371872ac

4.104.114.84.95
Last change on this file since 371872ac was 0567cb2, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/10/05 at 15:13:34

2005-02-10 Ralf Corsepius <ralf.corsepius@…>

  • cpu.c, cpu_asm.S, irq_stub.S, rtems/score/ppc_offs.h: Remove PPC_ABI_POWEROPEN.
  • Property mode set to 100644
File size: 13.2 KB
Line 
1
2/*  cpu_asm.s   1.1 - 95/12/04
3 *
4 *  This file contains the assembly code for the PowerPC implementation
5 *  of RTEMS.
6 *
7 *  Author:     Andrew Bray <andy@i-cubed.co.uk>
8 *
9 *  COPYRIGHT (c) 1995 by i-cubed ltd.
10 *
11 *  To anyone who acknowledges that this file is provided "AS IS"
12 *  without any express or implied warranty:
13 *      permission to use, copy, modify, and distribute this file
14 *      for any purpose is hereby granted without fee, provided that
15 *      the above copyright notice and this notice appears in all
16 *      copies, and that the name of i-cubed limited not be used in
17 *      advertising or publicity pertaining to distribution of the
18 *      software without specific, written prior permission.
19 *      i-cubed limited makes no representations about the suitability
20 *      of this software for any purpose.
21 *
22 *  Derived from c/src/exec/cpu/no_cpu/cpu_asm.c:
23 *
24 *  COPYRIGHT (c) 1989-1997.
25 *  On-Line Applications Research Corporation (OAR).
26 *
27 *  The license and distribution terms for this file may in
28 *  the file LICENSE in this distribution or at
29 *  http://www.rtems.com/license/LICENSE.
30 *
31 *  $Id$
32 */
33
34/*
35 * FIXME: This file is bsp-dependent.
36 */
37#include <bspopts.h>
38
39#include <rtems/asm.h>
40#include <rtems/score/ppc_offs.h>
41
42        BEGIN_CODE
43/*
44 *  _CPU_Context_save_fp_context
45 *
46 *  This routine is responsible for saving the FP context
47 *  at *fp_context_ptr.  If the point to load the FP context
48 *  from is changed then the pointer is modified by this routine.
49 *
50 *  Sometimes a macro implementation of this is in cpu.h which dereferences
51 *  the ** and a similarly named routine in this file is passed something
52 *  like a (Context_Control_fp *).  The general rule on making this decision
53 *  is to avoid writing assembly language.
54 */
55
56        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
57        PUBLIC_PROC (_CPU_Context_save_fp)
58PROC (_CPU_Context_save_fp):
59#if (PPC_HAS_FPU == 1)
60        lwz     r3, 0(r3)
61#if (PPC_HAS_DOUBLE == 1)
62        stfd    f0, FP_0(r3)
63        stfd    f1, FP_1(r3)
64        stfd    f2, FP_2(r3)
65        stfd    f3, FP_3(r3)
66        stfd    f4, FP_4(r3)
67        stfd    f5, FP_5(r3)
68        stfd    f6, FP_6(r3)
69        stfd    f7, FP_7(r3)
70        stfd    f8, FP_8(r3)
71        stfd    f9, FP_9(r3)
72        stfd    f10, FP_10(r3)
73        stfd    f11, FP_11(r3)
74        stfd    f12, FP_12(r3)
75        stfd    f13, FP_13(r3)
76        stfd    f14, FP_14(r3)
77        stfd    f15, FP_15(r3)
78        stfd    f16, FP_16(r3)
79        stfd    f17, FP_17(r3)
80        stfd    f18, FP_18(r3)
81        stfd    f19, FP_19(r3)
82        stfd    f20, FP_20(r3)
83        stfd    f21, FP_21(r3)
84        stfd    f22, FP_22(r3)
85        stfd    f23, FP_23(r3)
86        stfd    f24, FP_24(r3)
87        stfd    f25, FP_25(r3)
88        stfd    f26, FP_26(r3)
89        stfd    f27, FP_27(r3)
90        stfd    f28, FP_28(r3)
91        stfd    f29, FP_29(r3)
92        stfd    f30, FP_30(r3)
93        stfd    f31, FP_31(r3)
94        mffs    f2
95        stfd    f2, FP_FPSCR(r3)
96#else
97        stfs    f0, FP_0(r3)
98        stfs    f1, FP_1(r3)
99        stfs    f2, FP_2(r3)
100        stfs    f3, FP_3(r3)
101        stfs    f4, FP_4(r3)
102        stfs    f5, FP_5(r3)
103        stfs    f6, FP_6(r3)
104        stfs    f7, FP_7(r3)
105        stfs    f8, FP_8(r3)
106        stfs    f9, FP_9(r3)
107        stfs    f10, FP_10(r3)
108        stfs    f11, FP_11(r3)
109        stfs    f12, FP_12(r3)
110        stfs    f13, FP_13(r3)
111        stfs    f14, FP_14(r3)
112        stfs    f15, FP_15(r3)
113        stfs    f16, FP_16(r3)
114        stfs    f17, FP_17(r3)
115        stfs    f18, FP_18(r3)
116        stfs    f19, FP_19(r3)
117        stfs    f20, FP_20(r3)
118        stfs    f21, FP_21(r3)
119        stfs    f22, FP_22(r3)
120        stfs    f23, FP_23(r3)
121        stfs    f24, FP_24(r3)
122        stfs    f25, FP_25(r3)
123        stfs    f26, FP_26(r3)
124        stfs    f27, FP_27(r3)
125        stfs    f28, FP_28(r3)
126        stfs    f29, FP_29(r3)
127        stfs    f30, FP_30(r3)
128        stfs    f31, FP_31(r3)
129        mffs    f2
130        stfs    f2, FP_FPSCR(r3)
131#endif
132#endif
133        blr
134
135/*
136 *  _CPU_Context_restore_fp_context
137 *
138 *  This routine is responsible for restoring the FP context
139 *  at *fp_context_ptr.  If the point to load the FP context
140 *  from is changed then the pointer is modified by this routine.
141 *
142 *  Sometimes a macro implementation of this is in cpu.h which dereferences
143 *  the ** and a similarly named routine in this file is passed something
144 *  like a (Context_Control_fp *).  The general rule on making this decision
145 *  is to avoid writing assembly language.
146 */
147
148        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
149        PUBLIC_PROC (_CPU_Context_restore_fp)
150PROC (_CPU_Context_restore_fp):
151#if (PPC_HAS_FPU == 1)
152        lwz     r3, 0(r3)
153#if (PPC_HAS_DOUBLE == 1)
154        lfd     f2, FP_FPSCR(r3)
155        mtfsf   255, f2
156        lfd     f0, FP_0(r3)
157        lfd     f1, FP_1(r3)
158        lfd     f2, FP_2(r3)
159        lfd     f3, FP_3(r3)
160        lfd     f4, FP_4(r3)
161        lfd     f5, FP_5(r3)
162        lfd     f6, FP_6(r3)
163        lfd     f7, FP_7(r3)
164        lfd     f8, FP_8(r3)
165        lfd     f9, FP_9(r3)
166        lfd     f10, FP_10(r3)
167        lfd     f11, FP_11(r3)
168        lfd     f12, FP_12(r3)
169        lfd     f13, FP_13(r3)
170        lfd     f14, FP_14(r3)
171        lfd     f15, FP_15(r3)
172        lfd     f16, FP_16(r3)
173        lfd     f17, FP_17(r3)
174        lfd     f18, FP_18(r3)
175        lfd     f19, FP_19(r3)
176        lfd     f20, FP_20(r3)
177        lfd     f21, FP_21(r3)
178        lfd     f22, FP_22(r3)
179        lfd     f23, FP_23(r3)
180        lfd     f24, FP_24(r3)
181        lfd     f25, FP_25(r3)
182        lfd     f26, FP_26(r3)
183        lfd     f27, FP_27(r3)
184        lfd     f28, FP_28(r3)
185        lfd     f29, FP_29(r3)
186        lfd     f30, FP_30(r3)
187        lfd     f31, FP_31(r3)
188#else
189        lfs     f2, FP_FPSCR(r3)
190        mtfsf   255, f2
191        lfs     f0, FP_0(r3)
192        lfs     f1, FP_1(r3)
193        lfs     f2, FP_2(r3)
194        lfs     f3, FP_3(r3)
195        lfs     f4, FP_4(r3)
196        lfs     f5, FP_5(r3)
197        lfs     f6, FP_6(r3)
198        lfs     f7, FP_7(r3)
199        lfs     f8, FP_8(r3)
200        lfs     f9, FP_9(r3)
201        lfs     f10, FP_10(r3)
202        lfs     f11, FP_11(r3)
203        lfs     f12, FP_12(r3)
204        lfs     f13, FP_13(r3)
205        lfs     f14, FP_14(r3)
206        lfs     f15, FP_15(r3)
207        lfs     f16, FP_16(r3)
208        lfs     f17, FP_17(r3)
209        lfs     f18, FP_18(r3)
210        lfs     f19, FP_19(r3)
211        lfs     f20, FP_20(r3)
212        lfs     f21, FP_21(r3)
213        lfs     f22, FP_22(r3)
214        lfs     f23, FP_23(r3)
215        lfs     f24, FP_24(r3)
216        lfs     f25, FP_25(r3)
217        lfs     f26, FP_26(r3)
218        lfs     f27, FP_27(r3)
219        lfs     f28, FP_28(r3)
220        lfs     f29, FP_29(r3)
221        lfs     f30, FP_30(r3)
222        lfs     f31, FP_31(r3)
223#endif
224#endif
225        blr
226
227/*  _CPU_Context_switch
228 *
229 *  This routine performs a normal non-FP context switch.
230 */
231        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
232        PUBLIC_PROC (_CPU_Context_switch)
233PROC (_CPU_Context_switch):
234        sync
235        isync
236#if (PPC_CACHE_ALIGNMENT == 4) /* No cache */
237        stw     r1, GP_1(r3)
238        lwz     r1, GP_1(r4)
239        stw     r2, GP_2(r3)
240        lwz     r2, GP_2(r4)
241#if (PPC_USE_MULTIPLE == 1)
242        stmw    r13, GP_13(r3)
243        lmw     r13, GP_13(r4)
244#else
245        stw     r13, GP_13(r3)
246        lwz     r13, GP_13(r4)
247        stw     r14, GP_14(r3)
248        lwz     r14, GP_14(r4)
249        stw     r15, GP_15(r3)
250        lwz     r15, GP_15(r4)
251        stw     r16, GP_16(r3)
252        lwz     r16, GP_16(r4)
253        stw     r17, GP_17(r3)
254        lwz     r17, GP_17(r4)
255        stw     r18, GP_18(r3)
256        lwz     r18, GP_18(r4)
257        stw     r19, GP_19(r3)
258        lwz     r19, GP_19(r4)
259        stw     r20, GP_20(r3)
260        lwz     r20, GP_20(r4)
261        stw     r21, GP_21(r3)
262        lwz     r21, GP_21(r4)
263        stw     r22, GP_22(r3)
264        lwz     r22, GP_22(r4)
265        stw     r23, GP_23(r3)
266        lwz     r23, GP_23(r4)
267        stw     r24, GP_24(r3)
268        lwz     r24, GP_24(r4)
269        stw     r25, GP_25(r3)
270        lwz     r25, GP_25(r4)
271        stw     r26, GP_26(r3)
272        lwz     r26, GP_26(r4)
273        stw     r27, GP_27(r3)
274        lwz     r27, GP_27(r4)
275        stw     r28, GP_28(r3)
276        lwz     r28, GP_28(r4)
277        stw     r29, GP_29(r3)
278        lwz     r29, GP_29(r4)
279        stw     r30, GP_30(r3)
280        lwz     r30, GP_30(r4)
281        stw     r31, GP_31(r3)
282        lwz     r31, GP_31(r4)
283#endif
284        mfcr    r5
285        stw     r5, GP_CR(r3)
286        lwz     r5, GP_CR(r4)
287        mflr    r6
288        mtcrf   255, r5
289        stw     r6, GP_PC(r3)
290        lwz     r6, GP_PC(r4)
291        mfmsr   r7
292        mtlr    r6
293        stw     r7, GP_MSR(r3)
294        lwz     r7, GP_MSR(r4)
295        mtmsr   r7
296#endif
297#if (PPC_CACHE_ALIGNMENT == 16)
298        /* This assumes that all the registers are in the given order */
299        li      r5, 16
300        addi    r3,r3,-4
301#if ( PPC_USE_DATA_CACHE )
302        dcbz    r5, r3
303#endif
304        stw     r1, GP_1+4(r3)
305        stw     r2, GP_2+4(r3)
306#if (PPC_USE_MULTIPLE == 1)
307        addi    r3, r3, GP_14+4
308#if ( PPC_USE_DATA_CACHE )
309        dcbz    r5, r3
310#endif
311
312        addi    r3, r3, GP_18-GP_14
313#if ( PPC_USE_DATA_CACHE )
314        dcbz    r5, r3
315#endif
316        addi    r3, r3, GP_22-GP_18
317#if ( PPC_USE_DATA_CACHE )
318        dcbz    r5, r3
319#endif
320        addi    r3, r3, GP_26-GP_22
321#if ( PPC_USE_DATA_CACHE )
322        dcbz    r5, r3
323#endif
324        stmw    r13, GP_13-GP_26(r3)
325#else
326        stw     r13, GP_13+4(r3)
327        stwu    r14, GP_14+4(r3)
328#if ( PPC_USE_DATA_CACHE )
329        dcbz    r5, r3
330#endif
331        stw     r15, GP_15-GP_14(r3)
332        stw     r16, GP_16-GP_14(r3)
333        stw     r17, GP_17-GP_14(r3)
334        stwu    r18, GP_18-GP_14(r3)
335#if ( PPC_USE_DATA_CACHE )
336        dcbz    r5, r3
337#endif
338        stw     r19, GP_19-GP_18(r3)
339        stw     r20, GP_20-GP_18(r3)
340        stw     r21, GP_21-GP_18(r3)
341        stwu    r22, GP_22-GP_18(r3)
342#if ( PPC_USE_DATA_CACHE )
343        dcbz    r5, r3
344#endif
345        stw     r23, GP_23-GP_22(r3)
346        stw     r24, GP_24-GP_22(r3)
347        stw     r25, GP_25-GP_22(r3)
348        stwu    r26, GP_26-GP_22(r3)
349#if ( PPC_USE_DATA_CACHE )
350        dcbz    r5, r3
351#endif
352        stw     r27, GP_27-GP_26(r3)
353        stw     r28, GP_28-GP_26(r3)
354        stw     r29, GP_29-GP_26(r3)
355        stw     r30, GP_30-GP_26(r3)
356        stw     r31, GP_31-GP_26(r3)
357#endif
358#if ( PPC_USE_DATA_CACHE )
359        dcbt    r0, r4
360#endif
361        mfcr    r6
362        stw     r6, GP_CR-GP_26(r3)
363        mflr    r7
364        stw     r7, GP_PC-GP_26(r3)
365        mfmsr   r8
366        stw     r8, GP_MSR-GP_26(r3)
367
368#if ( PPC_USE_DATA_CACHE )
369        dcbt    r5, r4
370#endif
371        lwz     r1, GP_1(r4)
372        lwz     r2, GP_2(r4)
373#if (PPC_USE_MULTIPLE == 1)
374        addi    r4, r4, GP_15
375#if ( PPC_USE_DATA_CACHE )
376        dcbt    r5, r4
377#endif
378        addi    r4, r4, GP_19-GP_15
379#if ( PPC_USE_DATA_CACHE )
380        dcbt    r5, r4
381#endif
382        addi    r4, r4, GP_23-GP_19
383#if ( PPC_USE_DATA_CACHE )
384        dcbt    r5, r4
385#endif
386        addi    r4, r4, GP_27-GP_23
387#if ( PPC_USE_DATA_CACHE )
388        dcbt    r5, r4
389#endif
390        lmw     r13, GP_13-GP_27(r4)
391#else
392        lwz     r13, GP_13(r4)
393        lwz     r14, GP_14(r4)
394        lwzu    r15, GP_15(r4)
395#if ( PPC_USE_DATA_CACHE )
396        dcbt    r5, r4
397#endif
398        lwz     r16, GP_16-GP_15(r4)
399        lwz     r17, GP_17-GP_15(r4)
400        lwz     r18, GP_18-GP_15(r4)
401        lwzu    r19, GP_19-GP_15(r4)
402#if ( PPC_USE_DATA_CACHE )
403        dcbt    r5, r4
404#endif
405        lwz     r20, GP_20-GP_19(r4)
406        lwz     r21, GP_21-GP_19(r4)
407        lwz     r22, GP_22-GP_19(r4)
408        lwzu    r23, GP_23-GP_19(r4)
409#if ( PPC_USE_DATA_CACHE )
410        dcbt    r5, r4
411#endif
412        lwz     r24, GP_24-GP_23(r4)
413        lwz     r25, GP_25-GP_23(r4)
414        lwz     r26, GP_26-GP_23(r4)
415        lwzu    r27, GP_27-GP_23(r4)
416#if ( PPC_USE_DATA_CACHE )
417        dcbt    r5, r4
418#endif
419        lwz     r28, GP_28-GP_27(r4)
420        lwz     r29, GP_29-GP_27(r4)
421        lwz     r30, GP_30-GP_27(r4)
422        lwz     r31, GP_31-GP_27(r4)
423#endif
424        lwz     r6, GP_CR-GP_27(r4)
425        lwz     r7, GP_PC-GP_27(r4)
426        lwz     r8, GP_MSR-GP_27(r4)
427        mtcrf   255, r6
428        mtlr    r7
429        mtmsr   r8
430#endif
431#if (PPC_CACHE_ALIGNMENT == 32)
432        /* This assumes that all the registers are in the given order */
433        li      r5, 32
434        addi    r3,r3,-4
435#if ( PPC_USE_DATA_CACHE )
436        dcbz    r5, r3
437#endif
438        stw     r1, GP_1+4(r3)
439        stw     r2, GP_2+4(r3)
440#if (PPC_USE_MULTIPLE == 1)
441        addi    r3, r3, GP_18+4
442#if ( PPC_USE_DATA_CACHE )
443        dcbz    r5, r3
444#endif
445        stmw    r13, GP_13-GP_18(r3)
446#else
447        stw     r13, GP_13+4(r3)
448        stw     r14, GP_14+4(r3)
449        stw     r15, GP_15+4(r3)
450        stw     r16, GP_16+4(r3)
451        stw     r17, GP_17+4(r3)
452        stwu    r18, GP_18+4(r3)
453#if ( PPC_USE_DATA_CACHE )
454        dcbz    r5, r3
455#endif
456        stw     r19, GP_19-GP_18(r3)
457        stw     r20, GP_20-GP_18(r3)
458        stw     r21, GP_21-GP_18(r3)
459        stw     r22, GP_22-GP_18(r3)
460        stw     r23, GP_23-GP_18(r3)
461        stw     r24, GP_24-GP_18(r3)
462        stw     r25, GP_25-GP_18(r3)
463        stw     r26, GP_26-GP_18(r3)
464        stw     r27, GP_27-GP_18(r3)
465        stw     r28, GP_28-GP_18(r3)
466        stw     r29, GP_29-GP_18(r3)
467        stw     r30, GP_30-GP_18(r3)
468        stw     r31, GP_31-GP_18(r3)
469#endif
470#if ( PPC_USE_DATA_CACHE )
471        dcbt    r0, r4
472#endif
473        mfcr    r6
474        stw     r6, GP_CR-GP_18(r3)
475        mflr    r7
476        stw     r7, GP_PC-GP_18(r3)
477        mfmsr   r8
478        stw     r8, GP_MSR-GP_18(r3)
479
480#if ( PPC_USE_DATA_CACHE )
481        dcbt    r5, r4
482#endif
483        lwz     r1, GP_1(r4)
484        lwz     r2, GP_2(r4)
485#if (PPC_USE_MULTIPLE == 1)
486        addi    r4, r4, GP_19
487#if ( PPC_USE_DATA_CACHE )
488        dcbt    r5, r4
489#endif
490        lmw     r13, GP_13-GP_19(r4)
491#else
492        lwz     r13, GP_13(r4)
493        lwz     r14, GP_14(r4)
494        lwz     r15, GP_15(r4)
495        lwz     r16, GP_16(r4)
496        lwz     r17, GP_17(r4)
497        lwz     r18, GP_18(r4)
498        lwzu    r19, GP_19(r4)
499#if ( PPC_USE_DATA_CACHE )
500        dcbt    r5, r4
501#endif
502        lwz     r20, GP_20-GP_19(r4)
503        lwz     r21, GP_21-GP_19(r4)
504        lwz     r22, GP_22-GP_19(r4)
505        lwz     r23, GP_23-GP_19(r4)
506        lwz     r24, GP_24-GP_19(r4)
507        lwz     r25, GP_25-GP_19(r4)
508        lwz     r26, GP_26-GP_19(r4)
509        lwz     r27, GP_27-GP_19(r4)
510        lwz     r28, GP_28-GP_19(r4)
511        lwz     r29, GP_29-GP_19(r4)
512        lwz     r30, GP_30-GP_19(r4)
513        lwz     r31, GP_31-GP_19(r4)
514#endif
515        lwz     r6, GP_CR-GP_19(r4)
516        lwz     r7, GP_PC-GP_19(r4)
517        lwz     r8, GP_MSR-GP_19(r4)
518        mtcrf   255, r6
519        mtlr    r7
520        mtmsr   r8
521#endif
522        blr
523
524/*
525 *  _CPU_Context_restore
526 *
527 *  This routine is generallu used only to restart self in an
528 *  efficient manner.  It may simply be a label in _CPU_Context_switch.
529 *
530 *  NOTE: May be unnecessary to reload some registers.
531 */
532/*
533 * ACB: Don't worry about cache optimisation here - this is not THAT critical.
534 */
535        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
536        PUBLIC_PROC (_CPU_Context_restore)
537PROC (_CPU_Context_restore):
538        lwz     r5, GP_CR(r3)
539        lwz     r6, GP_PC(r3)
540        lwz     r7, GP_MSR(r3)
541        mtcrf   255, r5
542        mtlr    r6
543        mtmsr   r7
544        lwz     r1, GP_1(r3)
545        lwz     r2, GP_2(r3)
546#if (PPC_USE_MULTIPLE == 1)
547        lmw     r13, GP_13(r3)
548#else
549        lwz     r13, GP_13(r3)
550        lwz     r14, GP_14(r3)
551        lwz     r15, GP_15(r3)
552        lwz     r16, GP_16(r3)
553        lwz     r17, GP_17(r3)
554        lwz     r18, GP_18(r3)
555        lwz     r19, GP_19(r3)
556        lwz     r20, GP_20(r3)
557        lwz     r21, GP_21(r3)
558        lwz     r22, GP_22(r3)
559        lwz     r23, GP_23(r3)
560        lwz     r24, GP_24(r3)
561        lwz     r25, GP_25(r3)
562        lwz     r26, GP_26(r3)
563        lwz     r27, GP_27(r3)
564        lwz     r28, GP_28(r3)
565        lwz     r29, GP_29(r3)
566        lwz     r30, GP_30(r3)
567        lwz     r31, GP_31(r3)
568#endif
569
570        blr
571
572/*  Individual interrupt prologues look like this:
573 *      stwu    r1, -(IP_END)(r1)
574 *      stw     r0, IP_0(r1)
575 *
576 *      li      r0, vectornum
577 *      b       PROC (_ISR_Handler{,C})
578 */
579
580/*  void __ISR_Handler()
581 *
582 *  This routine provides the RTEMS interrupt management.
583 *  The vector number is in r0. R0 has already been stacked.
584 *
585 */
586        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
587        PUBLIC_PROC (_ISR_Handler)
588PROC (_ISR_Handler):
589#define LABEL(x)        x
590/*  XXX ??
591#define MTSAVE(x)       mtspr   sprg0, x
592#define MFSAVE(x)       mfspr   x, sprg0
593*/
594#define MTPC(x)         mtspr   srr0, x
595#define MFPC(x)         mfspr   x, srr0
596#define MTMSR(x)        mtspr   srr1, x
597#define MFMSR(x)        mfspr   x, srr1
598
599        #include        "irq_stub.S"
600        rfi
601
602#if (PPC_HAS_RFCI == 1)
603/*  void __ISR_HandlerC()
604 *
605 *  This routine provides the RTEMS interrupt management.
606 *  For critical interrupts
607 *
608 */
609        ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER)
610        PUBLIC_PROC (_ISR_HandlerC)
611PROC (_ISR_HandlerC):
612#undef  LABEL
613#undef  MTSAVE
614#undef  MFSAVE
615#undef  MTPC
616#undef  MFPC
617#undef  MTMSR
618#undef  MFMSR
619#define LABEL(x)        x##_C
620/* XXX??
621#define MTSAVE(x)       mtspr   sprg1, x
622#define MFSAVE(x)       mfspr   x, sprg1
623*/
624#define MTPC(x)         mtspr   srr2, x
625#define MFPC(x)         mfspr   x, srr2
626#define MTMSR(x)        mtspr   srr3, x
627#define MFMSR(x)        mfspr   x, srr3
628        #include        "irq_stub.S"
629        rfci
630#endif
Note: See TracBrowser for help on using the repository browser.