Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / ppc-native / exec / exception_vectors.s
blobbaa567be2b84b3099e47b279fcb1afd828cad214
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 .space 0x100
7 .space 0x200
8 .space 0x300
9 .space 0x400
10 .space 0x500
11 .space 0x600
12 /* handler for program type exceptions */
13 .space 0x700
15 push scr
16 mflr scr /* save lr, so we can move it to srr0 later */
17 push scr
18 mfsrr0 scr
19 /* was it called from Supervisor function? */
20 cmp scr,_Supervisor_trp
21 beq _superv_fn
22 /* was it called from Superstate function? */
23 cmp scr,_Superstate_trp
24 beq _supers_fn
26 -----------------------
27 /* not yet converted to PPC */
29 /* Store trap number */
30 pv: move.l #8,-(sp)
31 bra _TrapEntry
33 /* And handle the trap */
34 _TrapEntry:
35 /* Simple disable */
36 or.w #0x0700,sr
38 /* get some room for destination address */
39 subq.w #4,sp
41 /* calculate destination address without clobbering any registers */
42 move.l a0,-(sp)
43 move.l 4,a0
44 move.l ThisTask(a0),a0
45 move.l tc_TrapCode(a0),4(sp)
46 move.l (sp)+,a0
48 /* and jump */
49 pop scr
50 mtlr scr
51 pop scr
52 blr
54 ----------------------
56 _superv_fn:
57 /* execute user function */
58 ljmp arg0
59 _supers_fn:
60 /* restore lr */
61 pop scr
62 mtlr scr
63 /* restore scr saved in Superstate() */
64 pop scr
65 /* fake "supervisor stack" address */
66 mr ret,sp
67 /* return from Superstate() subroutine */
68 blr