lint
[unix-history] / usr / src / sys / vax / include / trap.h
CommitLineData
80992c50
KB
1/*-
2 * Copyright (c) 1982, 1986 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.proprietary.c%
da7c5cc6 6 *
80992c50 7 * @(#)trap.h 7.4 (Berkeley) %G%
da7c5cc6 8 */
4d549c62
BJ
9
10/*
11 * Trap type values
6c45bcf0 12 * also known in trap.c for name strings
4d549c62
BJ
13 */
14
b67d2217
BJ
15#define T_RESADFLT 0 /* reserved addressing fault */
16#define T_PRIVINFLT 1 /* privileged instruction fault */
17#define T_RESOPFLT 2 /* reserved operand fault */
6c45bcf0
MK
18/* definitions for <sys/signal.h> */
19#define ILL_RESAD_FAULT T_RESADFLT
20#define ILL_PRIVIN_FAULT T_PRIVINFLT
21#define ILL_RESOP_FAULT T_RESOPFLT
22/* CHME, CHMS, CHMU are not yet given back to users reasonably */
b67d2217
BJ
23#define T_BPTFLT 3 /* bpt instruction fault */
24#define T_XFCFLT 4 /* xfc instruction fault */
25#define T_SYSCALL 5 /* chmk instruction (syscall trap) */
26#define T_ARITHTRAP 6 /* arithmetic trap */
27#define T_ASTFLT 7 /* software level 2 trap (ast deliv) */
28#define T_SEGFLT 8 /* segmentation fault */
29#define T_PROTFLT 9 /* protection fault */
30#define T_TRCTRAP 10 /* trace trap */
31#define T_COMPATFLT 11 /* compatibility mode fault */
32#define T_PAGEFLT 12 /* page fault */
33#define T_TABLEFLT 13 /* page table fault */
233e2ac3 34#define T_KDBTRAP 14 /* kernel debugger trap */
6c45bcf0
MK
35
36/* codes for SIGFPE/ARITHTRAP */
37#define FPE_INTOVF_TRAP 0x1 /* integer overflow */
38#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */
39#define FPE_FLTOVF_TRAP 0x3 /* floating overflow */
40#define FPE_FLTDIV_TRAP 0x4 /* floating/decimal divide by zero */
41#define FPE_FLTUND_TRAP 0x5 /* floating underflow */
42#define FPE_DECOVF_TRAP 0x6 /* decimal overflow */
43#define FPE_SUBRNG_TRAP 0x7 /* subscript out of range */
44#define FPE_FLTOVF_FAULT 0x8 /* floating overflow fault */
45#define FPE_FLTDIV_FAULT 0x9 /* divide by zero floating fault */
46#define FPE_FLTUND_FAULT 0xa /* floating underflow fault */