Removed __startup attribute. It is already present in AROS_SHxx definition, and doubl...
[AROS.git] / arch / m68k-mac / exec / traps.c
blob21fc01d3d6841ab20a15107f887b9bb065a381c7
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <asm/linkage.h>
7 #include <exec/ptrace.h>
8 #include <exec/alerts.h>
9 #include <proto/exec.h>
10 #include <aros/debug.h>
11 #include <asm/cpu.h>
12 #include <asm/registers.h>
14 #include "traps.h"
15 #include "pp_exec_internal.h"
17 void do_TRAP(struct pt_regs regs)
19 ULONG alert = 0;
20 #if 0
21 kprintf("*** trap: eip = %x eflags = %x ds = %x sp ~= %x\n",
22 regs.eip, regs.eflags, regs.xds, &regs);
24 switch (regs.orig_eax) {
25 case 0:
26 alert = ACPU_DivZero;
27 break;
28 case 6:
29 alert = ACPU_InstErr;
30 break;
31 default:
32 alert = AT_DeadEnd | 0x100 | regs.orig_eax;
34 #endif
35 Alert(alert);
38 void Init_Traps(void) {
39 INSTALL_TRAP_HANDLER(TRAP_1, _sys_trap1_handler);