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) && !defined(CONFIG_HADES)
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
51 /* process bits for task_struct.ptrace */
59 #define SAVE_ALL_INT save_all_int
60 #define SAVE_ALL_SYS save_all_sys
61 #define RESTORE_ALL restore_all
63 * This defines the normal kernel pt-regs layout.
65 * regs a3-a6 and d6-d7 are preserved by C code
66 * the kernel doesn't mess with usp unless it needs to
70 * a -1 in the orig_d0 field signifies
71 * that the stack frame is NOT for syscall
77 moveml
%d1
-%d5
/%a0
-%a1
/%curptr
,%sp@
-
82 movel
%d0
,%sp@
- | orig d0
84 moveml
%d1
-%d5
/%a0
-%a1
/%curptr
,%sp@
-
88 moveml
%sp@
+,%a0
-%a1
/%curptr
/%d1
-%d5
90 addql
#4,%sp | orig d0
91 addl
%sp@
+,%sp
| stk adj
95 #define SWITCH_STACK_SIZE (6*4+4) /* includes return address */
97 #define SAVE_SWITCH_STACK save_switch_stack
98 #define RESTORE_SWITCH_STACK restore_switch_stack
99 #define GET_CURRENT(tmp) get_current tmp
101 .macro save_switch_stack
102 moveml
%a3
-%a6
/%d6
-%d7
,%sp@
-
105 .macro restore_switch_stack
106 moveml
%sp@
+,%a3
-%a6
/%d6
-%d7
109 .macro get_current reg
=%d0
111 andw
#-THREAD_SIZE,\reg
113 movel
%curptr@
,%curptr
118 #define STR(X) STR1(X)
121 #define PT_OFF_ORIG_D0 0x24
122 #define PT_OFF_FORMATVEC 0x32
123 #define PT_OFF_SR 0x2C
124 #define SAVE_ALL_INT \
125 "clrl %%sp@-;" /* stk_adj */ \
126 "pea -1:w;" /* orig d0 = -1 */ \
127 "movel %%d0,%%sp@-;" /* d0 */ \
128 "moveml %%d1-%%d5/%%a0-%%a2,%%sp@-"
129 #define GET_CURRENT(tmp) \
130 "movel %%sp,"#tmp"\n\t" \
131 "andw #-"STR(THREAD_SIZE)","#tmp"\n\t" \
132 "movel "#tmp",%%a2\n\t" \
137 #endif /* __M68K_ENTRY_H */