xref: /original-bsd/sys/tahoe/include/trap.h (revision 0a83ae40)
1 /*	trap.h	1.3	87/07/11	*/
2 
3 /*
4  * Trap type values
5  * also known in trap.c for name strings
6  */
7 
8 #define	T_RESADFLT	0	/* reserved addressing */
9 #define	T_PRIVINFLT	1	/* privileged instruction */
10 #define	T_RESOPFLT	2	/* reserved operand */
11 #define	T_BPTFLT	3	/* breakpoint instruction */
12 #define	T_SYSCALL	5	/* system call (kcall) */
13 #define	T_ARITHTRAP	6	/* arithmetic trap */
14 #define	T_ASTFLT	7	/* system forced exception */
15 #define	T_SEGFLT	8	/* segmentation (limit) fault */
16 #define	T_PROTFLT	9	/* protection fault */
17 #define	T_TRCTRAP	10	/* trace trap */
18 #define	T_PAGEFLT	12	/* page fault */
19 #define	T_TABLEFLT	13	/* page table fault */
20 #define	T_ALIGNFLT	14	/* alignment fault */
21 #define	T_KSPNOTVAL	15	/* kernel stack pointer not valid */
22 #define	T_BUSERR	16	/* bus error */
23 #define	T_KDBTRAP	17	/* kernel debugger trap */
24 
25 /* definitions for <sys/signal.h> */
26 #define	    ILL_RESAD_FAULT	T_RESADFLT
27 #define	    ILL_PRIVIN_FAULT	T_PRIVINFLT
28 #define	    ILL_RESOP_FAULT	T_RESOPFLT
29 #define	    ILL_ALIGN_FAULT	T_ALIGNFLT
30 
31 /* codes for SIGFPE/ARITHTRAP */
32 #define	    FPE_INTOVF_TRAP	0x1	/* integer overflow */
33 #define	    FPE_INTDIV_TRAP	0x2	/* integer divide by zero */
34 #define	    FPE_FLTDIV_TRAP	0x3	/* floating/decimal divide by zero */
35 #define	    FPE_FLTOVF_TRAP	0x4	/* floating overflow */
36 #define	    FPE_FLTUND_TRAP	0x5	/* floating underflow */
37