]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * @OSF_COPYRIGHT@ | |
27 | */ | |
28 | /* | |
29 | * Copyright (c) 1990, 1991, 1992, The University of Utah and | |
30 | * the Center for Software Science at the University of Utah (CSS). | |
31 | * All rights reserved. | |
32 | * | |
33 | * Permission to use, copy, modify and distribute this software is hereby | |
34 | * granted provided that (1) source code retains these copyright, permission, | |
35 | * and disclaimer notices, and (2) redistributions including binaries | |
36 | * reproduce the notices in supporting documentation, and (3) all advertising | |
37 | * materials mentioning features or use of this software display the following | |
38 | * acknowledgement: ``This product includes software developed by the Center | |
39 | * for Software Science at the University of Utah.'' | |
40 | * | |
41 | * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS | |
42 | * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF | |
43 | * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
44 | * | |
45 | * CSS requests users of this software to return to css-dist@cs.utah.edu any | |
46 | * improvements that they make and grant CSS redistribution rights. | |
47 | * | |
48 | * Utah $Hdr: $ | |
49 | */ | |
50 | ||
51 | #ifndef _MACH_PPC_EXCEPTION_H_ | |
52 | #define _MACH_PPC_EXCEPTION_H_ | |
53 | ||
54 | ||
55 | /* STATUS - TODO - this is just transcribed from hp stuff */ | |
56 | ||
57 | #define EXC_TYPES_COUNT 10 /* incl. illegal exception 0 */ | |
58 | ||
59 | #define EXCEPTION_CODE_MAX 2 /* elements in vector (code+subcode) */ | |
60 | /* | |
61 | * EXC_BAD_INSTRUCTION | |
62 | */ | |
63 | ||
64 | #define EXC_PPC_INVALID_SYSCALL 1 /* invalid syscall number */ | |
65 | #define EXC_PPC_UNIPL_INST 2 /* unimplemented instruction */ | |
66 | #define EXC_PPC_PRIVINST 3 /* priviledged instruction */ | |
67 | #define EXC_PPC_PRIVREG 4 /* priviledged register */ | |
68 | #define EXC_PPC_TRACE 5 /* trace/single-step */ | |
69 | ||
70 | /* | |
71 | * EXC_BAD_ACCESS | |
72 | * Note: do not conflict with kern_return_t values returned by vm_fault | |
73 | */ | |
74 | ||
75 | #define EXC_PPC_VM_PROT_READ 0x101 /* error reading syscall args */ | |
76 | #define EXC_PPC_BADSPACE 0x102 /* bad space referenced */ | |
77 | #define EXC_PPC_UNALIGNED 0x103 /* unaligned data reference */ | |
78 | ||
79 | /* | |
80 | * EXC_ARITHMETIC | |
81 | */ | |
82 | ||
83 | #define EXC_PPC_OVERFLOW 1 /* integer overflow */ | |
84 | #define EXC_PPC_ZERO_DIVIDE 2 /* integer divide by zero */ | |
85 | #define EXC_PPC_FLT_INEXACT 3 /* IEEE inexact exception */ | |
86 | #define EXC_PPC_FLT_ZERO_DIVIDE 4 /* IEEE zero divide */ | |
87 | #define EXC_PPC_FLT_UNDERFLOW 5 /* IEEE floating underflow */ | |
88 | #define EXC_PPC_FLT_OVERFLOW 6 /* IEEE floating overflow */ | |
89 | #define EXC_PPC_FLT_NOT_A_NUMBER 7 /* IEEE not a number */ | |
90 | ||
91 | /* | |
92 | * EXC_PPC_NOEMULATION should go away when we add software emulation | |
93 | * for floating point. Right now we don't support this. | |
94 | */ | |
95 | ||
96 | #define EXC_PPC_NOEMULATION 8 /* no floating point emulation */ | |
97 | #define EXC_PPC_ALTIVECASSIST 9 /* Altivec Denorm Assist */ | |
98 | ||
99 | /* | |
100 | * EXC_SOFTWARE | |
9bccf70c | 101 | * Note: 0x10000-0x10003 in use for unix signal |
1c79356b A |
102 | */ |
103 | #define EXC_PPC_TRAP 1 /* Program trap */ | |
104 | #define EXC_PPC_MIGRATE 0x10100 /* Time to bolt */ | |
105 | ||
106 | ||
107 | /* | |
108 | * EXC_BREAKPOINT | |
109 | */ | |
110 | ||
111 | #define EXC_PPC_BREAKPOINT EXC_PPC_TRAP /* breakpoint trap */ | |
112 | ||
113 | /* | |
114 | * machine dependent exception masks | |
115 | */ | |
116 | #define EXC_MASK_MACHINE 0 | |
117 | ||
118 | #endif /* _MACH_PPC_EXCEPTION_H_ */ |