faults.hh revision 2800
12221SN/A/*
22221SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
32221SN/A * All rights reserved.
42221SN/A *
52221SN/A * Redistribution and use in source and binary forms, with or without
62221SN/A * modification, are permitted provided that the following conditions are
72221SN/A * met: redistributions of source code must retain the above copyright
82221SN/A * notice, this list of conditions and the following disclaimer;
92221SN/A * redistributions in binary form must reproduce the above copyright
102221SN/A * notice, this list of conditions and the following disclaimer in the
112221SN/A * documentation and/or other materials provided with the distribution;
122221SN/A * neither the name of the copyright holders nor the names of its
132221SN/A * contributors may be used to endorse or promote products derived from
142221SN/A * this software without specific prior written permission.
152221SN/A *
162221SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172221SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182221SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192221SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202221SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212221SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222221SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232221SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242221SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252221SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262221SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Gabe Black
292665Ssaidi@eecs.umich.edu *          Kevin Lim
302221SN/A */
312221SN/A
322221SN/A#ifndef __ALPHA_FAULTS_HH__
332221SN/A#define __ALPHA_FAULTS_HH__
342221SN/A
352221SN/A#include "sim/faults.hh"
362221SN/A
372221SN/A// The design of the "name" and "vect" functions is in sim/faults.hh
382221SN/A
392223SN/Anamespace SparcISA
402221SN/A{
412221SN/A
422223SN/Atypedef const uint32_t TrapType;
432223SN/Atypedef const uint32_t FaultPriority;
442221SN/A
452223SN/Aclass SparcFault : public FaultBase
462221SN/A{
472221SN/A  public:
482221SN/A#if FULL_SYSTEM
492680Sktlim@umich.edu    void invoke(ThreadContext * tc);
502221SN/A#endif
512223SN/A    virtual TrapType trapType() = 0;
522223SN/A    virtual FaultPriority priority() = 0;
532223SN/A    virtual FaultStat & countStat() = 0;
542221SN/A};
552221SN/A
562223SN/Aclass InternalProcessorError : public SparcFault
572221SN/A{
582221SN/A  private:
592221SN/A    static FaultName _name;
602223SN/A    static TrapType _trapType;
612223SN/A    static FaultPriority _priority;
622223SN/A    static FaultStat _count;
632221SN/A  public:
642221SN/A    FaultName name() {return _name;}
652223SN/A    TrapType trapType() {return _trapType;}
662223SN/A    FaultPriority priority() {return _priority;}
672223SN/A    FaultStat & countStat() {return _count;}
682221SN/A    bool isMachineCheckFault() {return true;}
692221SN/A};
702221SN/A
712223SN/Aclass MemAddressNotAligned : public SparcFault
722221SN/A{
732221SN/A  private:
742221SN/A    static FaultName _name;
752223SN/A    static TrapType _trapType;
762223SN/A    static FaultPriority _priority;
772223SN/A    static FaultStat _count;
782221SN/A  public:
792221SN/A    FaultName name() {return _name;}
802223SN/A    TrapType trapType() {return _trapType;}
812223SN/A    FaultPriority priority() {return _priority;}
822223SN/A    FaultStat & countStat() {return _count;}
832221SN/A    bool isAlignmentFault() {return true;}
842221SN/A};
852221SN/A
862800Ssaidi@eecs.umich.edu#if !FULL_SYSTEM
872800Ssaidi@eecs.umich.educlass PageTableFault : public SparcFault
882800Ssaidi@eecs.umich.edu{
892800Ssaidi@eecs.umich.edu  private:
902800Ssaidi@eecs.umich.edu    Addr vaddr;
912800Ssaidi@eecs.umich.edu    static FaultName _name;
922800Ssaidi@eecs.umich.edu    static TrapType _trapType;
932800Ssaidi@eecs.umich.edu    static FaultPriority _priority;
942800Ssaidi@eecs.umich.edu    static FaultStat _count;
952800Ssaidi@eecs.umich.edu  public:
962800Ssaidi@eecs.umich.edu    PageTableFault(Addr va)
972800Ssaidi@eecs.umich.edu        : vaddr(va) {}
982800Ssaidi@eecs.umich.edu    FaultName name() {return _name;}
992800Ssaidi@eecs.umich.edu    TrapType trapType() {return _trapType;}
1002800Ssaidi@eecs.umich.edu    FaultPriority priority() {return _priority;}
1012800Ssaidi@eecs.umich.edu    FaultStat & countStat() {return _count;}
1022800Ssaidi@eecs.umich.edu    void invoke(ThreadContext * tc);
1032800Ssaidi@eecs.umich.edu};
1042800Ssaidi@eecs.umich.edu
1052800Ssaidi@eecs.umich.edustatic inline Fault genPageTableFault(Addr va)
1062800Ssaidi@eecs.umich.edu{
1072800Ssaidi@eecs.umich.edu    return new PageTableFault(va);
1082800Ssaidi@eecs.umich.edu}
1092800Ssaidi@eecs.umich.edu#endif
1102800Ssaidi@eecs.umich.edu
1112221SN/Astatic inline Fault genMachineCheckFault()
1122221SN/A{
1132223SN/A    return new InternalProcessorError;
1142221SN/A}
1152221SN/A
1162221SN/Astatic inline Fault genAlignmentFault()
1172221SN/A{
1182223SN/A    return new MemAddressNotAligned;
1192221SN/A}
1202221SN/A
1212223SN/Aclass PowerOnReset : public SparcFault
1222221SN/A{
1232221SN/A  private:
1242221SN/A    static FaultName _name;
1252223SN/A    static TrapType _trapType;
1262223SN/A    static FaultPriority _priority;
1272223SN/A    static FaultStat _count;
1282221SN/A  public:
1292221SN/A    FaultName name() {return _name;}
1302223SN/A    TrapType trapType() {return _trapType;}
1312223SN/A    FaultPriority priority() {return _priority;}
1322223SN/A    FaultStat & countStat() {return _count;}
1332221SN/A};
1342221SN/A
1352223SN/Aclass WatchDogReset : public SparcFault
1362221SN/A{
1372221SN/A  private:
1382221SN/A    static FaultName _name;
1392223SN/A    static TrapType _trapType;
1402223SN/A    static FaultPriority _priority;
1412223SN/A    static FaultStat _count;
1422221SN/A  public:
1432221SN/A    FaultName name() {return _name;}
1442223SN/A    TrapType trapType() {return _trapType;}
1452223SN/A    FaultPriority priority() {return _priority;}
1462223SN/A    FaultStat & countStat() {return _count;}
1472221SN/A};
1482221SN/A
1492223SN/Aclass ExternallyInitiatedReset : public SparcFault
1502221SN/A{
1512221SN/A  private:
1522221SN/A    static FaultName _name;
1532223SN/A    static TrapType _trapType;
1542223SN/A    static FaultPriority _priority;
1552223SN/A    static FaultStat _count;
1562221SN/A  public:
1572221SN/A    FaultName name() {return _name;}
1582223SN/A    TrapType trapType() {return _trapType;}
1592223SN/A    FaultPriority priority() {return _priority;}
1602223SN/A    FaultStat & countStat() {return _count;}
1612221SN/A};
1622221SN/A
1632223SN/Aclass SoftwareInitiatedReset : public SparcFault
1642221SN/A{
1652221SN/A  private:
1662221SN/A    static FaultName _name;
1672223SN/A    static TrapType _trapType;
1682223SN/A    static FaultPriority _priority;
1692223SN/A    static FaultStat _count;
1702221SN/A  public:
1712221SN/A    FaultName name() {return _name;}
1722223SN/A    TrapType trapType() {return _trapType;}
1732223SN/A    FaultPriority priority() {return _priority;}
1742223SN/A    FaultStat & countStat() {return _count;}
1752221SN/A};
1762221SN/A
1772223SN/Aclass REDStateException : public SparcFault
1782221SN/A{
1792221SN/A  private:
1802221SN/A    static FaultName _name;
1812223SN/A    static TrapType _trapType;
1822223SN/A    static FaultPriority _priority;
1832223SN/A    static FaultStat _count;
1842221SN/A  public:
1852221SN/A    FaultName name() {return _name;}
1862223SN/A    TrapType trapType() {return _trapType;}
1872223SN/A    FaultPriority priority() {return _priority;}
1882223SN/A    FaultStat & countStat() {return _count;}
1892221SN/A};
1902221SN/A
1912223SN/Aclass InstructionAccessException : public SparcFault
1922221SN/A{
1932221SN/A  private:
1942221SN/A    static FaultName _name;
1952223SN/A    static TrapType _trapType;
1962223SN/A    static FaultPriority _priority;
1972223SN/A    static FaultStat _count;
1982221SN/A  public:
1992221SN/A    FaultName name() {return _name;}
2002223SN/A    TrapType trapType() {return _trapType;}
2012223SN/A    FaultPriority priority() {return _priority;}
2022223SN/A    FaultStat & countStat() {return _count;}
2032221SN/A};
2042221SN/A
2052223SN/Aclass InstructionAccessMMUMiss : public SparcFault
2062221SN/A{
2072221SN/A  private:
2082221SN/A    static FaultName _name;
2092223SN/A    static TrapType _trapType;
2102223SN/A    static FaultPriority _priority;
2112223SN/A    static FaultStat _count;
2122221SN/A  public:
2132221SN/A    FaultName name() {return _name;}
2142223SN/A    TrapType trapType() {return _trapType;}
2152223SN/A    FaultPriority priority() {return _priority;}
2162223SN/A    FaultStat & countStat() {return _count;}
2172221SN/A};
2182221SN/A
2192223SN/Aclass InstructionAccessError : public SparcFault
2202221SN/A{
2212221SN/A  private:
2222221SN/A    static FaultName _name;
2232223SN/A    static TrapType _trapType;
2242223SN/A    static FaultPriority _priority;
2252223SN/A    static FaultStat _count;
2262221SN/A  public:
2272221SN/A    FaultName name() {return _name;}
2282223SN/A    TrapType trapType() {return _trapType;}
2292223SN/A    FaultPriority priority() {return _priority;}
2302223SN/A    FaultStat & countStat() {return _count;}
2312221SN/A};
2322221SN/A
2332223SN/Aclass IllegalInstruction : public SparcFault
2342221SN/A{
2352221SN/A  private:
2362221SN/A    static FaultName _name;
2372223SN/A    static TrapType _trapType;
2382223SN/A    static FaultPriority _priority;
2392223SN/A    static FaultStat _count;
2402221SN/A  public:
2412221SN/A    FaultName name() {return _name;}
2422223SN/A    TrapType trapType() {return _trapType;}
2432223SN/A    FaultPriority priority() {return _priority;}
2442223SN/A    FaultStat & countStat() {return _count;}
2452221SN/A};
2462221SN/A
2472469SN/Aclass PrivilegedOpcode : public SparcFault
2482221SN/A{
2492221SN/A  private:
2502221SN/A    static FaultName _name;
2512223SN/A    static TrapType _trapType;
2522223SN/A    static FaultPriority _priority;
2532223SN/A    static FaultStat _count;
2542221SN/A  public:
2552221SN/A    FaultName name() {return _name;}
2562223SN/A    TrapType trapType() {return _trapType;}
2572223SN/A    FaultPriority priority() {return _priority;}
2582223SN/A    FaultStat & countStat() {return _count;}
2592221SN/A};
2602221SN/A
2612223SN/Aclass UnimplementedLDD : public SparcFault
2622221SN/A{
2632221SN/A  private:
2642221SN/A    static FaultName _name;
2652223SN/A    static TrapType _trapType;
2662223SN/A    static FaultPriority _priority;
2672223SN/A    static FaultStat _count;
2682221SN/A  public:
2692221SN/A    FaultName name() {return _name;}
2702223SN/A    TrapType trapType() {return _trapType;}
2712223SN/A    FaultPriority priority() {return _priority;}
2722223SN/A    FaultStat & countStat() {return _count;}
2732221SN/A};
2742221SN/A
2752223SN/Aclass UnimplementedSTD : public SparcFault
2762223SN/A{
2772223SN/A  private:
2782223SN/A    static FaultName _name;
2792223SN/A    static TrapType _trapType;
2802223SN/A    static FaultPriority _priority;
2812223SN/A    static FaultStat _count;
2822223SN/A  public:
2832223SN/A    FaultName name() {return _name;}
2842223SN/A    TrapType trapType() {return _trapType;}
2852223SN/A    FaultPriority priority() {return _priority;}
2862223SN/A    FaultStat & countStat() {return _count;}
2872223SN/A};
2882223SN/A
2892223SN/Aclass FpDisabled : public SparcFault
2902223SN/A{
2912223SN/A  private:
2922223SN/A    static FaultName _name;
2932223SN/A    static TrapType _trapType;
2942223SN/A    static FaultPriority _priority;
2952223SN/A    static FaultStat _count;
2962223SN/A  public:
2972223SN/A    FaultName name() {return _name;}
2982223SN/A    TrapType trapType() {return _trapType;}
2992223SN/A    FaultPriority priority() {return _priority;}
3002223SN/A    FaultStat & countStat() {return _count;}
3012223SN/A};
3022223SN/A
3032223SN/Aclass FpExceptionIEEE754 : public SparcFault
3042223SN/A{
3052223SN/A  private:
3062223SN/A    static FaultName _name;
3072223SN/A    static TrapType _trapType;
3082223SN/A    static FaultPriority _priority;
3092223SN/A    static FaultStat _count;
3102223SN/A  public:
3112223SN/A    FaultName name() {return _name;}
3122223SN/A    TrapType trapType() {return _trapType;}
3132223SN/A    FaultPriority priority() {return _priority;}
3142223SN/A    FaultStat & countStat() {return _count;}
3152223SN/A};
3162223SN/A
3172223SN/Aclass FpExceptionOther : public SparcFault
3182223SN/A{
3192223SN/A  private:
3202223SN/A    static FaultName _name;
3212223SN/A    static TrapType _trapType;
3222223SN/A    static FaultPriority _priority;
3232223SN/A    static FaultStat _count;
3242223SN/A  public:
3252223SN/A    FaultName name() {return _name;}
3262223SN/A    TrapType trapType() {return _trapType;}
3272223SN/A    FaultPriority priority() {return _priority;}
3282223SN/A    FaultStat & countStat() {return _count;}
3292223SN/A};
3302223SN/A
3312223SN/Aclass TagOverflow : public SparcFault
3322223SN/A{
3332223SN/A  private:
3342223SN/A    static FaultName _name;
3352223SN/A    static TrapType _trapType;
3362223SN/A    static FaultPriority _priority;
3372223SN/A    static FaultStat _count;
3382223SN/A  public:
3392223SN/A    FaultName name() {return _name;}
3402223SN/A    TrapType trapType() {return _trapType;}
3412223SN/A    FaultPriority priority() {return _priority;}
3422223SN/A    FaultStat & countStat() {return _count;}
3432223SN/A};
3442223SN/A
3452223SN/Aclass DivisionByZero : public SparcFault
3462223SN/A{
3472223SN/A  private:
3482223SN/A    static FaultName _name;
3492223SN/A    static TrapType _trapType;
3502223SN/A    static FaultPriority _priority;
3512223SN/A    static FaultStat _count;
3522223SN/A  public:
3532223SN/A    FaultName name() {return _name;}
3542223SN/A    TrapType trapType() {return _trapType;}
3552223SN/A    FaultPriority priority() {return _priority;}
3562223SN/A    FaultStat & countStat() {return _count;}
3572223SN/A};
3582223SN/A
3592223SN/Aclass DataAccessException : public SparcFault
3602223SN/A{
3612223SN/A  private:
3622223SN/A    static FaultName _name;
3632223SN/A    static TrapType _trapType;
3642223SN/A    static FaultPriority _priority;
3652223SN/A    static FaultStat _count;
3662223SN/A  public:
3672223SN/A    FaultName name() {return _name;}
3682223SN/A    TrapType trapType() {return _trapType;}
3692223SN/A    FaultPriority priority() {return _priority;}
3702223SN/A    FaultStat & countStat() {return _count;}
3712223SN/A};
3722223SN/A
3732223SN/Aclass DataAccessMMUMiss : public SparcFault
3742223SN/A{
3752223SN/A  private:
3762223SN/A    static FaultName _name;
3772223SN/A    static TrapType _trapType;
3782223SN/A    static FaultPriority _priority;
3792223SN/A    static FaultStat _count;
3802223SN/A  public:
3812223SN/A    FaultName name() {return _name;}
3822223SN/A    TrapType trapType() {return _trapType;}
3832223SN/A    FaultPriority priority() {return _priority;}
3842223SN/A    FaultStat & countStat() {return _count;}
3852223SN/A};
3862223SN/A
3872223SN/Aclass DataAccessError : public SparcFault
3882223SN/A{
3892223SN/A  private:
3902223SN/A    static FaultName _name;
3912223SN/A    static TrapType _trapType;
3922223SN/A    static FaultPriority _priority;
3932223SN/A    static FaultStat _count;
3942223SN/A  public:
3952223SN/A    FaultName name() {return _name;}
3962223SN/A    TrapType trapType() {return _trapType;}
3972223SN/A    FaultPriority priority() {return _priority;}
3982223SN/A    FaultStat & countStat() {return _count;}
3992223SN/A};
4002223SN/A
4012223SN/Aclass DataAccessProtection : public SparcFault
4022223SN/A{
4032223SN/A  private:
4042223SN/A    static FaultName _name;
4052223SN/A    static TrapType _trapType;
4062223SN/A    static FaultPriority _priority;
4072223SN/A    static FaultStat _count;
4082223SN/A  public:
4092223SN/A    FaultName name() {return _name;}
4102223SN/A    TrapType trapType() {return _trapType;}
4112223SN/A    FaultPriority priority() {return _priority;}
4122223SN/A    FaultStat & countStat() {return _count;}
4132223SN/A};
4142223SN/A
4152223SN/Aclass LDDFMemAddressNotAligned : public SparcFault
4162223SN/A{
4172223SN/A  private:
4182223SN/A    static FaultName _name;
4192223SN/A    static TrapType _trapType;
4202223SN/A    static FaultPriority _priority;
4212223SN/A    static FaultStat _count;
4222223SN/A  public:
4232223SN/A    FaultName name() {return _name;}
4242223SN/A    TrapType trapType() {return _trapType;}
4252223SN/A    FaultPriority priority() {return _priority;}
4262223SN/A    FaultStat & countStat() {return _count;}
4272223SN/A};
4282223SN/A
4292223SN/Aclass STDFMemAddressNotAligned : public SparcFault
4302223SN/A{
4312223SN/A  private:
4322223SN/A    static FaultName _name;
4332223SN/A    static TrapType _trapType;
4342223SN/A    static FaultPriority _priority;
4352223SN/A    static FaultStat _count;
4362223SN/A  public:
4372223SN/A    FaultName name() {return _name;}
4382223SN/A    TrapType trapType() {return _trapType;}
4392223SN/A    FaultPriority priority() {return _priority;}
4402223SN/A    FaultStat & countStat() {return _count;}
4412223SN/A};
4422223SN/A
4432469SN/Aclass PrivilegedAction : public SparcFault
4442223SN/A{
4452223SN/A  private:
4462223SN/A    static FaultName _name;
4472223SN/A    static TrapType _trapType;
4482223SN/A    static FaultPriority _priority;
4492223SN/A    static FaultStat _count;
4502223SN/A  public:
4512223SN/A    FaultName name() {return _name;}
4522223SN/A    TrapType trapType() {return _trapType;}
4532223SN/A    FaultPriority priority() {return _priority;}
4542223SN/A    FaultStat & countStat() {return _count;}
4552223SN/A};
4562223SN/A
4572223SN/Aclass LDQFMemAddressNotAligned : public SparcFault
4582223SN/A{
4592223SN/A  private:
4602223SN/A    static FaultName _name;
4612223SN/A    static TrapType _trapType;
4622223SN/A    static FaultPriority _priority;
4632223SN/A    static FaultStat _count;
4642223SN/A  public:
4652223SN/A    FaultName name() {return _name;}
4662223SN/A    TrapType trapType() {return _trapType;}
4672223SN/A    FaultPriority priority() {return _priority;}
4682223SN/A    FaultStat & countStat() {return _count;}
4692223SN/A};
4702223SN/A
4712223SN/Aclass STQFMemAddressNotAligned : public SparcFault
4722223SN/A{
4732223SN/A  private:
4742223SN/A    static FaultName _name;
4752223SN/A    static TrapType _trapType;
4762223SN/A    static FaultPriority _priority;
4772223SN/A    static FaultStat _count;
4782223SN/A  public:
4792223SN/A    FaultName name() {return _name;}
4802223SN/A    TrapType trapType() {return _trapType;}
4812223SN/A    FaultPriority priority() {return _priority;}
4822223SN/A    FaultStat & countStat() {return _count;}
4832223SN/A};
4842223SN/A
4852223SN/Aclass AsyncDataError : public SparcFault
4862223SN/A{
4872223SN/A  private:
4882223SN/A    static FaultName _name;
4892223SN/A    static TrapType _trapType;
4902223SN/A    static FaultPriority _priority;
4912223SN/A    static FaultStat _count;
4922223SN/A  public:
4932223SN/A    FaultName name() {return _name;}
4942223SN/A    TrapType trapType() {return _trapType;}
4952223SN/A    FaultPriority priority() {return _priority;}
4962223SN/A    FaultStat & countStat() {return _count;}
4972223SN/A};
4982223SN/A
4992527SN/Aclass CleanWindow : public SparcFault
5002527SN/A{
5012527SN/A  private:
5022527SN/A    static FaultName _name;
5032527SN/A    static TrapType _trapType;
5042527SN/A    static FaultPriority _priority;
5052527SN/A    static FaultStat _count;
5062527SN/A  public:
5072527SN/A    FaultName name() {return _name;}
5082527SN/A    TrapType trapType() {return _trapType;}
5092527SN/A    FaultPriority priority() {return _priority;}
5102527SN/A    FaultStat & countStat() {return _count;}
5112527SN/A};
5122527SN/A
5132223SN/Aclass EnumeratedFault : public SparcFault
5142223SN/A{
5152223SN/A  protected:
5162223SN/A    uint32_t _n;
5172223SN/A    virtual TrapType baseTrapType() = 0;
5182223SN/A  public:
5192223SN/A    EnumeratedFault(uint32_t n) : SparcFault() {_n = n;}
5202223SN/A    TrapType trapType() {return baseTrapType() + _n;}
5212223SN/A};
5222223SN/A
5232223SN/Aclass InterruptLevelN : public EnumeratedFault
5242223SN/A{
5252223SN/A  private:
5262223SN/A    static FaultName _name;
5272223SN/A    static TrapType _baseTrapType;
5282223SN/A    static FaultStat _count;
5292223SN/A    TrapType baseTrapType() {return _baseTrapType;}
5302223SN/A  public:
5312223SN/A    InterruptLevelN(uint32_t n) : EnumeratedFault(n) {;}
5322223SN/A    FaultName name() {return _name;}
5332223SN/A    FaultPriority priority() {return 32 - _n;}
5342223SN/A    FaultStat & countStat() {return _count;}
5352223SN/A};
5362223SN/A
5372223SN/Aclass SpillNNormal : public EnumeratedFault
5382223SN/A{
5392223SN/A  private:
5402223SN/A    static FaultName _name;
5412223SN/A    static TrapType _baseTrapType;
5422223SN/A    static FaultPriority _priority;
5432223SN/A    static FaultStat _count;
5442223SN/A    TrapType baseTrapType() {return _baseTrapType;}
5452223SN/A  public:
5462223SN/A    SpillNNormal(uint32_t n) : EnumeratedFault(n) {;}
5472223SN/A    FaultName name() {return _name;}
5482223SN/A    FaultPriority priority() {return _priority;}
5492223SN/A    FaultStat & countStat() {return _count;}
5502223SN/A};
5512223SN/A
5522223SN/Aclass SpillNOther : public EnumeratedFault
5532223SN/A{
5542223SN/A  private:
5552223SN/A    static FaultName _name;
5562223SN/A    static TrapType _baseTrapType;
5572223SN/A    static FaultPriority _priority;
5582223SN/A    static FaultStat _count;
5592223SN/A    TrapType baseTrapType() {return _baseTrapType;}
5602223SN/A  public:
5612223SN/A    SpillNOther(uint32_t n) : EnumeratedFault(n) {;}
5622223SN/A    FaultName name() {return _name;}
5632223SN/A    FaultPriority priority() {return _priority;}
5642223SN/A    FaultStat & countStat() {return _count;}
5652223SN/A};
5662223SN/A
5672223SN/Aclass FillNNormal : public EnumeratedFault
5682223SN/A{
5692223SN/A  private:
5702223SN/A    static FaultName _name;
5712223SN/A    static TrapType _baseTrapType;
5722223SN/A    static FaultPriority _priority;
5732223SN/A    static FaultStat _count;
5742223SN/A    TrapType baseTrapType() {return _baseTrapType;}
5752223SN/A  public:
5762223SN/A    FillNNormal(uint32_t n) : EnumeratedFault(n) {;}
5772223SN/A    FaultName name() {return _name;}
5782223SN/A    FaultPriority priority() {return _priority;}
5792223SN/A    FaultStat & countStat() {return _count;}
5802223SN/A};
5812223SN/A
5822223SN/Aclass FillNOther : public EnumeratedFault
5832223SN/A{
5842223SN/A  private:
5852223SN/A    static FaultName _name;
5862223SN/A    static TrapType _baseTrapType;
5872223SN/A    static FaultPriority _priority;
5882223SN/A    static FaultStat _count;
5892223SN/A    TrapType baseTrapType() {return _baseTrapType;}
5902223SN/A  public:
5912223SN/A    FillNOther(uint32_t n) : EnumeratedFault(n) {;}
5922223SN/A    FaultName name() {return _name;}
5932223SN/A    FaultPriority priority() {return _priority;}
5942223SN/A    FaultStat & countStat() {return _count;}
5952223SN/A};
5962223SN/A
5972223SN/Aclass TrapInstruction : public EnumeratedFault
5982223SN/A{
5992223SN/A  private:
6002223SN/A    static FaultName _name;
6012223SN/A    static TrapType _baseTrapType;
6022223SN/A    static FaultPriority _priority;
6032223SN/A    static FaultStat _count;
6042612SN/A    uint64_t syscall_num;
6052223SN/A    TrapType baseTrapType() {return _baseTrapType;}
6062223SN/A  public:
6072612SN/A    TrapInstruction(uint32_t n, uint64_t syscall) :
6082612SN/A        EnumeratedFault(n), syscall_num(syscall) {;}
6092223SN/A    FaultName name() {return _name;}
6102223SN/A    FaultPriority priority() {return _priority;}
6112223SN/A    FaultStat & countStat() {return _count;}
6122612SN/A#if !FULL_SYSTEM
6132680Sktlim@umich.edu    void invoke(ThreadContext * tc);
6142523SN/A#endif
6152523SN/A};
6162523SN/A
6172800Ssaidi@eecs.umich.edu
6182223SN/A} // SparcISA namespace
6192221SN/A
6202221SN/A#endif // __FAULTS_HH__
621