8 * Stack layout in 'ret_from_exception':
10 * This allows access to the syscall arguments in registers d1-d5
22 * 28(sp) - stack adjustment
25 * 32(sp) - format & vector
29 * 97/05/14 Andreas: Register %a2 is now set to the current task throughout
33 /* the following macro is used when enabling interrupts */
34 #if defined(MACH_ATARI_ONLY)
35 /* block out HSYNC on the atari */
36 #define ALLOWINT (~0x400)
37 #define MAX_NOINT_IPL 3
39 /* portable version */
40 #define ALLOWINT (~0x700)
41 #define MAX_NOINT_IPL 0
42 #endif /* machine compilation types */
48 LFLUSH_I_AND_D
= 0x00000808
50 /* process bits for task_struct.ptrace */
58 #define SAVE_ALL_INT save_all_int
59 #define SAVE_ALL_SYS save_all_sys
60 #define RESTORE_ALL restore_all
62 * This defines the normal kernel pt-regs layout.
64 * regs a3-a6 and d6-d7 are preserved by C code
65 * the kernel doesn't mess with usp unless it needs to
69 * a -1 in the orig_d0 field signifies
70 * that the stack frame is NOT for syscall
76 moveml
%d1
-%d5
/%a0
-%a1
/%curptr
,%sp@
-
81 movel
%d0
,%sp@
- | orig d0
83 moveml
%d1
-%d5
/%a0
-%a1
/%curptr
,%sp@
-
87 moveml
%sp@
+,%a0
-%a1
/%curptr
/%d1
-%d5
89 addql
#4,%sp | orig d0
90 addl
%sp@
+,%sp
| stk adj
94 #define SWITCH_STACK_SIZE (6*4+4) /* includes return address */
96 #define SAVE_SWITCH_STACK save_switch_stack
97 #define RESTORE_SWITCH_STACK restore_switch_stack
98 #define GET_CURRENT(tmp) get_current tmp
100 .macro save_switch_stack
101 moveml
%a3
-%a6
/%d6
-%d7
,%sp@
-
104 .macro restore_switch_stack
105 moveml
%sp@
+,%a3
-%a6
/%d6
-%d7
108 .macro get_current reg
=%d0
110 andw
#-THREAD_SIZE,\reg
112 movel
%curptr@
,%curptr
117 #define STR(X) STR1(X)
120 #define SAVE_ALL_INT \
121 "clrl %%sp@-;" /* stk_adj */ \
122 "pea -1:w;" /* orig d0 = -1 */ \
123 "movel %%d0,%%sp@-;" /* d0 */ \
124 "moveml %%d1-%%d5/%%a0-%%a2,%%sp@-"
125 #define GET_CURRENT(tmp) \
126 "movel %%sp,"#tmp"\n\t" \
127 "andw #-"STR(THREAD_SIZE)","#tmp"\n\t" \
128 "movel "#tmp",%%a2\n\t" \
133 #endif /* __M68K_ENTRY_H */