- Removed unused HandleEvent method.
[AROS.git] / arch / m68k-all / kernel / cpu_m68k.h
blob54dfc194bf198d12714c87b4db261f6c8fb2280c
1 /*
2 * CPU-specific definitions.
4 * Architectures with the same CPU will likely share single kernel_cpu.h
5 * in arch/$(CPU)-all/kernel/kernel_cpu.h
7 * As you can see, this file is just a sample.
8 */
10 #ifndef CPU_M68K_H_
11 #define CPU_M68K_H_
13 #include <aros/m68k/cpucontext.h>
14 #include <aros/m68k/fpucontext.h>
16 /* Number of exceptions supported by the CPU. Needed by kernel_base.h */
17 #define EXCEPTIONS_COUNT 256
19 /* CPU context stored in task's iet_Context. */
20 struct AROSCPUContext
22 struct ExceptionContext cpu;
23 struct FpuContext fpu;
26 typedef struct ExceptionContext regs_t;
29 * Only Exec/PrepareContext needs this.
31 #define PREPARE_INITIAL_FRAME(cc, sp, startpc) \
32 do { \
33 memset(cc, 0, sizeof(*cc)); \
34 cc->cpu.pc = (IPTR)startpc; \
35 cc->cpu.a[7] = (IPTR)sp; \
36 cc->cpu.sr = 0x0000; \
37 } while (0)
40 * Only used by Exec/Debug()
42 #define PRINT_CPU_CONTEXT(ctx) \
43 do { \
44 int i; \
45 UWORD sr = (ctx)->cpu.sr; \
46 for (i = 0; i < 8; i++) { \
47 bug("D%d: %08x%s", i, (ctx)->cpu.d[i], ((i%4) == 3) ? "\n" : " "); \
48 } \
49 for (i = 0; i < 8; i++) { \
50 bug("A%d: %08x%s", i, (ctx)->cpu.a[i], ((i%4) == 3) ? "\n" : " "); \
51 } \
52 bug("SR: T=%02d S=%d M=%d X=%d N=%d Z=%d V=%d C=%d IMASK=%d\n", \
53 (sr >> 14) & 3, (sr >> 13) & 1, (sr >> 5) & 1, \
54 (sr >> 4) & 1, (sr >> 3) & 1, (sr >> 2) & 1, \
55 (sr >> 1) & 1, (sr >> 0) & 1, (sr >> 8) & 7); \
56 bug("PC: %08x\n", (ctx)->cpu.pc); \
57 } while (0)
60 #endif /* _CPU_M68K_H */