Changed Fault * to Fault, which is a typedef to FaultBase *, which is the old Fault...
[gem5.git] / arch / alpha / faults.cc
1 /*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #include "arch/alpha/faults.hh"
30
31 ResetFaultType * const ResetFault =
32 new ResetFaultType("reset", 1, 0x0001);
33 ArithmeticFaultType * const ArithmeticFault =
34 new ArithmeticFaultType("arith", 3, 0x0501);
35 InterruptFaultType * const InterruptFault =
36 new InterruptFaultType("interrupt", 4, 0x0101);
37 NDtbMissFaultType * const NDtbMissFault =
38 new NDtbMissFaultType("dtb_miss_single", 5, 0x0201);
39 PDtbMissFaultType * const PDtbMissFault =
40 new PDtbMissFaultType("dtb_miss_double", 6, 0x0281);
41 DtbPageFaultType * const DtbPageFault =
42 new DtbPageFaultType("dfault", 8, 0x0381);
43 DtbAcvFaultType * const DtbAcvFault =
44 new DtbAcvFaultType("dfault", 9, 0x0381);
45 ItbMissFaultType * const ItbMissFault =
46 new ItbMissFaultType("itbmiss", 10, 0x0181);
47 ItbPageFaultType * const ItbPageFault =
48 new ItbPageFaultType("itbmiss", 11, 0x0181);
49 ItbAcvFaultType * const ItbAcvFault =
50 new ItbAcvFaultType("iaccvio", 12, 0x0081);
51 UnimplementedOpcodeFaultType * const UnimplementedOpcodeFault =
52 new UnimplementedOpcodeFaultType("opdec", 13, 0x0481);
53 FloatEnableFaultType * const FloatEnableFault =
54 new FloatEnableFaultType("fen", 14, 0x0581);
55 PalFaultType * const PalFault =
56 new PalFaultType("pal", 15, 0x2001);
57 IntegerOverflowFaultType * const IntegerOverflowFault =
58 new IntegerOverflowFaultType("intover", 16, 0x0501);
59
60 Fault * ListOfFaults[] = {
61 (Fault *)&NoFault,
62 (Fault *)&ResetFault,
63 (Fault *)&MachineCheckFault,
64 (Fault *)&ArithmeticFault,
65 (Fault *)&InterruptFault,
66 (Fault *)&NDtbMissFault,
67 (Fault *)&PDtbMissFault,
68 (Fault *)&AlignmentFault,
69 (Fault *)&DtbPageFault,
70 (Fault *)&DtbAcvFault,
71 (Fault *)&ItbMissFault,
72 (Fault *)&ItbPageFault,
73 (Fault *)&ItbAcvFault,
74 (Fault *)&UnimplementedOpcodeFault,
75 (Fault *)&FloatEnableFault,
76 (Fault *)&PalFault,
77 (Fault *)&IntegerOverflowFault,
78 };
79
80 int NumFaults = sizeof(ListOfFaults) / sizeof(Fault *);