faults.hh revision 2680
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 862221SN/Astatic inline Fault genMachineCheckFault() 872221SN/A{ 882223SN/A return new InternalProcessorError; 892221SN/A} 902221SN/A 912221SN/Astatic inline Fault genAlignmentFault() 922221SN/A{ 932223SN/A return new MemAddressNotAligned; 942221SN/A} 952221SN/A 962223SN/Aclass PowerOnReset : public SparcFault 972221SN/A{ 982221SN/A private: 992221SN/A static FaultName _name; 1002223SN/A static TrapType _trapType; 1012223SN/A static FaultPriority _priority; 1022223SN/A static FaultStat _count; 1032221SN/A public: 1042221SN/A FaultName name() {return _name;} 1052223SN/A TrapType trapType() {return _trapType;} 1062223SN/A FaultPriority priority() {return _priority;} 1072223SN/A FaultStat & countStat() {return _count;} 1082221SN/A}; 1092221SN/A 1102223SN/Aclass WatchDogReset : public SparcFault 1112221SN/A{ 1122221SN/A private: 1132221SN/A static FaultName _name; 1142223SN/A static TrapType _trapType; 1152223SN/A static FaultPriority _priority; 1162223SN/A static FaultStat _count; 1172221SN/A public: 1182221SN/A FaultName name() {return _name;} 1192223SN/A TrapType trapType() {return _trapType;} 1202223SN/A FaultPriority priority() {return _priority;} 1212223SN/A FaultStat & countStat() {return _count;} 1222221SN/A}; 1232221SN/A 1242223SN/Aclass ExternallyInitiatedReset : public SparcFault 1252221SN/A{ 1262221SN/A private: 1272221SN/A static FaultName _name; 1282223SN/A static TrapType _trapType; 1292223SN/A static FaultPriority _priority; 1302223SN/A static FaultStat _count; 1312221SN/A public: 1322221SN/A FaultName name() {return _name;} 1332223SN/A TrapType trapType() {return _trapType;} 1342223SN/A FaultPriority priority() {return _priority;} 1352223SN/A FaultStat & countStat() {return _count;} 1362221SN/A}; 1372221SN/A 1382223SN/Aclass SoftwareInitiatedReset : public SparcFault 1392221SN/A{ 1402221SN/A private: 1412221SN/A static FaultName _name; 1422223SN/A static TrapType _trapType; 1432223SN/A static FaultPriority _priority; 1442223SN/A static FaultStat _count; 1452221SN/A public: 1462221SN/A FaultName name() {return _name;} 1472223SN/A TrapType trapType() {return _trapType;} 1482223SN/A FaultPriority priority() {return _priority;} 1492223SN/A FaultStat & countStat() {return _count;} 1502221SN/A}; 1512221SN/A 1522223SN/Aclass REDStateException : public SparcFault 1532221SN/A{ 1542221SN/A private: 1552221SN/A static FaultName _name; 1562223SN/A static TrapType _trapType; 1572223SN/A static FaultPriority _priority; 1582223SN/A static FaultStat _count; 1592221SN/A public: 1602221SN/A FaultName name() {return _name;} 1612223SN/A TrapType trapType() {return _trapType;} 1622223SN/A FaultPriority priority() {return _priority;} 1632223SN/A FaultStat & countStat() {return _count;} 1642221SN/A}; 1652221SN/A 1662223SN/Aclass InstructionAccessException : public SparcFault 1672221SN/A{ 1682221SN/A private: 1692221SN/A static FaultName _name; 1702223SN/A static TrapType _trapType; 1712223SN/A static FaultPriority _priority; 1722223SN/A static FaultStat _count; 1732221SN/A public: 1742221SN/A FaultName name() {return _name;} 1752223SN/A TrapType trapType() {return _trapType;} 1762223SN/A FaultPriority priority() {return _priority;} 1772223SN/A FaultStat & countStat() {return _count;} 1782221SN/A}; 1792221SN/A 1802223SN/Aclass InstructionAccessMMUMiss : public SparcFault 1812221SN/A{ 1822221SN/A private: 1832221SN/A static FaultName _name; 1842223SN/A static TrapType _trapType; 1852223SN/A static FaultPriority _priority; 1862223SN/A static FaultStat _count; 1872221SN/A public: 1882221SN/A FaultName name() {return _name;} 1892223SN/A TrapType trapType() {return _trapType;} 1902223SN/A FaultPriority priority() {return _priority;} 1912223SN/A FaultStat & countStat() {return _count;} 1922221SN/A}; 1932221SN/A 1942223SN/Aclass InstructionAccessError : public SparcFault 1952221SN/A{ 1962221SN/A private: 1972221SN/A static FaultName _name; 1982223SN/A static TrapType _trapType; 1992223SN/A static FaultPriority _priority; 2002223SN/A static FaultStat _count; 2012221SN/A public: 2022221SN/A FaultName name() {return _name;} 2032223SN/A TrapType trapType() {return _trapType;} 2042223SN/A FaultPriority priority() {return _priority;} 2052223SN/A FaultStat & countStat() {return _count;} 2062221SN/A}; 2072221SN/A 2082223SN/Aclass IllegalInstruction : public SparcFault 2092221SN/A{ 2102221SN/A private: 2112221SN/A static FaultName _name; 2122223SN/A static TrapType _trapType; 2132223SN/A static FaultPriority _priority; 2142223SN/A static FaultStat _count; 2152221SN/A public: 2162221SN/A FaultName name() {return _name;} 2172223SN/A TrapType trapType() {return _trapType;} 2182223SN/A FaultPriority priority() {return _priority;} 2192223SN/A FaultStat & countStat() {return _count;} 2202221SN/A}; 2212221SN/A 2222469SN/Aclass PrivilegedOpcode : public SparcFault 2232221SN/A{ 2242221SN/A private: 2252221SN/A static FaultName _name; 2262223SN/A static TrapType _trapType; 2272223SN/A static FaultPriority _priority; 2282223SN/A static FaultStat _count; 2292221SN/A public: 2302221SN/A FaultName name() {return _name;} 2312223SN/A TrapType trapType() {return _trapType;} 2322223SN/A FaultPriority priority() {return _priority;} 2332223SN/A FaultStat & countStat() {return _count;} 2342221SN/A}; 2352221SN/A 2362223SN/Aclass UnimplementedLDD : public SparcFault 2372221SN/A{ 2382221SN/A private: 2392221SN/A static FaultName _name; 2402223SN/A static TrapType _trapType; 2412223SN/A static FaultPriority _priority; 2422223SN/A static FaultStat _count; 2432221SN/A public: 2442221SN/A FaultName name() {return _name;} 2452223SN/A TrapType trapType() {return _trapType;} 2462223SN/A FaultPriority priority() {return _priority;} 2472223SN/A FaultStat & countStat() {return _count;} 2482221SN/A}; 2492221SN/A 2502223SN/Aclass UnimplementedSTD : public SparcFault 2512223SN/A{ 2522223SN/A private: 2532223SN/A static FaultName _name; 2542223SN/A static TrapType _trapType; 2552223SN/A static FaultPriority _priority; 2562223SN/A static FaultStat _count; 2572223SN/A public: 2582223SN/A FaultName name() {return _name;} 2592223SN/A TrapType trapType() {return _trapType;} 2602223SN/A FaultPriority priority() {return _priority;} 2612223SN/A FaultStat & countStat() {return _count;} 2622223SN/A}; 2632223SN/A 2642223SN/Aclass FpDisabled : public SparcFault 2652223SN/A{ 2662223SN/A private: 2672223SN/A static FaultName _name; 2682223SN/A static TrapType _trapType; 2692223SN/A static FaultPriority _priority; 2702223SN/A static FaultStat _count; 2712223SN/A public: 2722223SN/A FaultName name() {return _name;} 2732223SN/A TrapType trapType() {return _trapType;} 2742223SN/A FaultPriority priority() {return _priority;} 2752223SN/A FaultStat & countStat() {return _count;} 2762223SN/A}; 2772223SN/A 2782223SN/Aclass FpExceptionIEEE754 : public SparcFault 2792223SN/A{ 2802223SN/A private: 2812223SN/A static FaultName _name; 2822223SN/A static TrapType _trapType; 2832223SN/A static FaultPriority _priority; 2842223SN/A static FaultStat _count; 2852223SN/A public: 2862223SN/A FaultName name() {return _name;} 2872223SN/A TrapType trapType() {return _trapType;} 2882223SN/A FaultPriority priority() {return _priority;} 2892223SN/A FaultStat & countStat() {return _count;} 2902223SN/A}; 2912223SN/A 2922223SN/Aclass FpExceptionOther : public SparcFault 2932223SN/A{ 2942223SN/A private: 2952223SN/A static FaultName _name; 2962223SN/A static TrapType _trapType; 2972223SN/A static FaultPriority _priority; 2982223SN/A static FaultStat _count; 2992223SN/A public: 3002223SN/A FaultName name() {return _name;} 3012223SN/A TrapType trapType() {return _trapType;} 3022223SN/A FaultPriority priority() {return _priority;} 3032223SN/A FaultStat & countStat() {return _count;} 3042223SN/A}; 3052223SN/A 3062223SN/Aclass TagOverflow : public SparcFault 3072223SN/A{ 3082223SN/A private: 3092223SN/A static FaultName _name; 3102223SN/A static TrapType _trapType; 3112223SN/A static FaultPriority _priority; 3122223SN/A static FaultStat _count; 3132223SN/A public: 3142223SN/A FaultName name() {return _name;} 3152223SN/A TrapType trapType() {return _trapType;} 3162223SN/A FaultPriority priority() {return _priority;} 3172223SN/A FaultStat & countStat() {return _count;} 3182223SN/A}; 3192223SN/A 3202223SN/Aclass DivisionByZero : public SparcFault 3212223SN/A{ 3222223SN/A private: 3232223SN/A static FaultName _name; 3242223SN/A static TrapType _trapType; 3252223SN/A static FaultPriority _priority; 3262223SN/A static FaultStat _count; 3272223SN/A public: 3282223SN/A FaultName name() {return _name;} 3292223SN/A TrapType trapType() {return _trapType;} 3302223SN/A FaultPriority priority() {return _priority;} 3312223SN/A FaultStat & countStat() {return _count;} 3322223SN/A}; 3332223SN/A 3342223SN/Aclass DataAccessException : public SparcFault 3352223SN/A{ 3362223SN/A private: 3372223SN/A static FaultName _name; 3382223SN/A static TrapType _trapType; 3392223SN/A static FaultPriority _priority; 3402223SN/A static FaultStat _count; 3412223SN/A public: 3422223SN/A FaultName name() {return _name;} 3432223SN/A TrapType trapType() {return _trapType;} 3442223SN/A FaultPriority priority() {return _priority;} 3452223SN/A FaultStat & countStat() {return _count;} 3462223SN/A}; 3472223SN/A 3482223SN/Aclass DataAccessMMUMiss : public SparcFault 3492223SN/A{ 3502223SN/A private: 3512223SN/A static FaultName _name; 3522223SN/A static TrapType _trapType; 3532223SN/A static FaultPriority _priority; 3542223SN/A static FaultStat _count; 3552223SN/A public: 3562223SN/A FaultName name() {return _name;} 3572223SN/A TrapType trapType() {return _trapType;} 3582223SN/A FaultPriority priority() {return _priority;} 3592223SN/A FaultStat & countStat() {return _count;} 3602223SN/A}; 3612223SN/A 3622223SN/Aclass DataAccessError : public SparcFault 3632223SN/A{ 3642223SN/A private: 3652223SN/A static FaultName _name; 3662223SN/A static TrapType _trapType; 3672223SN/A static FaultPriority _priority; 3682223SN/A static FaultStat _count; 3692223SN/A public: 3702223SN/A FaultName name() {return _name;} 3712223SN/A TrapType trapType() {return _trapType;} 3722223SN/A FaultPriority priority() {return _priority;} 3732223SN/A FaultStat & countStat() {return _count;} 3742223SN/A}; 3752223SN/A 3762223SN/Aclass DataAccessProtection : public SparcFault 3772223SN/A{ 3782223SN/A private: 3792223SN/A static FaultName _name; 3802223SN/A static TrapType _trapType; 3812223SN/A static FaultPriority _priority; 3822223SN/A static FaultStat _count; 3832223SN/A public: 3842223SN/A FaultName name() {return _name;} 3852223SN/A TrapType trapType() {return _trapType;} 3862223SN/A FaultPriority priority() {return _priority;} 3872223SN/A FaultStat & countStat() {return _count;} 3882223SN/A}; 3892223SN/A 3902223SN/Aclass LDDFMemAddressNotAligned : public SparcFault 3912223SN/A{ 3922223SN/A private: 3932223SN/A static FaultName _name; 3942223SN/A static TrapType _trapType; 3952223SN/A static FaultPriority _priority; 3962223SN/A static FaultStat _count; 3972223SN/A public: 3982223SN/A FaultName name() {return _name;} 3992223SN/A TrapType trapType() {return _trapType;} 4002223SN/A FaultPriority priority() {return _priority;} 4012223SN/A FaultStat & countStat() {return _count;} 4022223SN/A}; 4032223SN/A 4042223SN/Aclass STDFMemAddressNotAligned : public SparcFault 4052223SN/A{ 4062223SN/A private: 4072223SN/A static FaultName _name; 4082223SN/A static TrapType _trapType; 4092223SN/A static FaultPriority _priority; 4102223SN/A static FaultStat _count; 4112223SN/A public: 4122223SN/A FaultName name() {return _name;} 4132223SN/A TrapType trapType() {return _trapType;} 4142223SN/A FaultPriority priority() {return _priority;} 4152223SN/A FaultStat & countStat() {return _count;} 4162223SN/A}; 4172223SN/A 4182469SN/Aclass PrivilegedAction : public SparcFault 4192223SN/A{ 4202223SN/A private: 4212223SN/A static FaultName _name; 4222223SN/A static TrapType _trapType; 4232223SN/A static FaultPriority _priority; 4242223SN/A static FaultStat _count; 4252223SN/A public: 4262223SN/A FaultName name() {return _name;} 4272223SN/A TrapType trapType() {return _trapType;} 4282223SN/A FaultPriority priority() {return _priority;} 4292223SN/A FaultStat & countStat() {return _count;} 4302223SN/A}; 4312223SN/A 4322223SN/Aclass LDQFMemAddressNotAligned : public SparcFault 4332223SN/A{ 4342223SN/A private: 4352223SN/A static FaultName _name; 4362223SN/A static TrapType _trapType; 4372223SN/A static FaultPriority _priority; 4382223SN/A static FaultStat _count; 4392223SN/A public: 4402223SN/A FaultName name() {return _name;} 4412223SN/A TrapType trapType() {return _trapType;} 4422223SN/A FaultPriority priority() {return _priority;} 4432223SN/A FaultStat & countStat() {return _count;} 4442223SN/A}; 4452223SN/A 4462223SN/Aclass STQFMemAddressNotAligned : public SparcFault 4472223SN/A{ 4482223SN/A private: 4492223SN/A static FaultName _name; 4502223SN/A static TrapType _trapType; 4512223SN/A static FaultPriority _priority; 4522223SN/A static FaultStat _count; 4532223SN/A public: 4542223SN/A FaultName name() {return _name;} 4552223SN/A TrapType trapType() {return _trapType;} 4562223SN/A FaultPriority priority() {return _priority;} 4572223SN/A FaultStat & countStat() {return _count;} 4582223SN/A}; 4592223SN/A 4602223SN/Aclass AsyncDataError : public SparcFault 4612223SN/A{ 4622223SN/A private: 4632223SN/A static FaultName _name; 4642223SN/A static TrapType _trapType; 4652223SN/A static FaultPriority _priority; 4662223SN/A static FaultStat _count; 4672223SN/A public: 4682223SN/A FaultName name() {return _name;} 4692223SN/A TrapType trapType() {return _trapType;} 4702223SN/A FaultPriority priority() {return _priority;} 4712223SN/A FaultStat & countStat() {return _count;} 4722223SN/A}; 4732223SN/A 4742527SN/Aclass CleanWindow : public SparcFault 4752527SN/A{ 4762527SN/A private: 4772527SN/A static FaultName _name; 4782527SN/A static TrapType _trapType; 4792527SN/A static FaultPriority _priority; 4802527SN/A static FaultStat _count; 4812527SN/A public: 4822527SN/A FaultName name() {return _name;} 4832527SN/A TrapType trapType() {return _trapType;} 4842527SN/A FaultPriority priority() {return _priority;} 4852527SN/A FaultStat & countStat() {return _count;} 4862527SN/A}; 4872527SN/A 4882223SN/Aclass EnumeratedFault : public SparcFault 4892223SN/A{ 4902223SN/A protected: 4912223SN/A uint32_t _n; 4922223SN/A virtual TrapType baseTrapType() = 0; 4932223SN/A public: 4942223SN/A EnumeratedFault(uint32_t n) : SparcFault() {_n = n;} 4952223SN/A TrapType trapType() {return baseTrapType() + _n;} 4962223SN/A}; 4972223SN/A 4982223SN/Aclass InterruptLevelN : public EnumeratedFault 4992223SN/A{ 5002223SN/A private: 5012223SN/A static FaultName _name; 5022223SN/A static TrapType _baseTrapType; 5032223SN/A static FaultStat _count; 5042223SN/A TrapType baseTrapType() {return _baseTrapType;} 5052223SN/A public: 5062223SN/A InterruptLevelN(uint32_t n) : EnumeratedFault(n) {;} 5072223SN/A FaultName name() {return _name;} 5082223SN/A FaultPriority priority() {return 32 - _n;} 5092223SN/A FaultStat & countStat() {return _count;} 5102223SN/A}; 5112223SN/A 5122223SN/Aclass SpillNNormal : public EnumeratedFault 5132223SN/A{ 5142223SN/A private: 5152223SN/A static FaultName _name; 5162223SN/A static TrapType _baseTrapType; 5172223SN/A static FaultPriority _priority; 5182223SN/A static FaultStat _count; 5192223SN/A TrapType baseTrapType() {return _baseTrapType;} 5202223SN/A public: 5212223SN/A SpillNNormal(uint32_t n) : EnumeratedFault(n) {;} 5222223SN/A FaultName name() {return _name;} 5232223SN/A FaultPriority priority() {return _priority;} 5242223SN/A FaultStat & countStat() {return _count;} 5252223SN/A}; 5262223SN/A 5272223SN/Aclass SpillNOther : public EnumeratedFault 5282223SN/A{ 5292223SN/A private: 5302223SN/A static FaultName _name; 5312223SN/A static TrapType _baseTrapType; 5322223SN/A static FaultPriority _priority; 5332223SN/A static FaultStat _count; 5342223SN/A TrapType baseTrapType() {return _baseTrapType;} 5352223SN/A public: 5362223SN/A SpillNOther(uint32_t n) : EnumeratedFault(n) {;} 5372223SN/A FaultName name() {return _name;} 5382223SN/A FaultPriority priority() {return _priority;} 5392223SN/A FaultStat & countStat() {return _count;} 5402223SN/A}; 5412223SN/A 5422223SN/Aclass FillNNormal : public EnumeratedFault 5432223SN/A{ 5442223SN/A private: 5452223SN/A static FaultName _name; 5462223SN/A static TrapType _baseTrapType; 5472223SN/A static FaultPriority _priority; 5482223SN/A static FaultStat _count; 5492223SN/A TrapType baseTrapType() {return _baseTrapType;} 5502223SN/A public: 5512223SN/A FillNNormal(uint32_t n) : EnumeratedFault(n) {;} 5522223SN/A FaultName name() {return _name;} 5532223SN/A FaultPriority priority() {return _priority;} 5542223SN/A FaultStat & countStat() {return _count;} 5552223SN/A}; 5562223SN/A 5572223SN/Aclass FillNOther : public EnumeratedFault 5582223SN/A{ 5592223SN/A private: 5602223SN/A static FaultName _name; 5612223SN/A static TrapType _baseTrapType; 5622223SN/A static FaultPriority _priority; 5632223SN/A static FaultStat _count; 5642223SN/A TrapType baseTrapType() {return _baseTrapType;} 5652223SN/A public: 5662223SN/A FillNOther(uint32_t n) : EnumeratedFault(n) {;} 5672223SN/A FaultName name() {return _name;} 5682223SN/A FaultPriority priority() {return _priority;} 5692223SN/A FaultStat & countStat() {return _count;} 5702223SN/A}; 5712223SN/A 5722223SN/Aclass TrapInstruction : public EnumeratedFault 5732223SN/A{ 5742223SN/A private: 5752223SN/A static FaultName _name; 5762223SN/A static TrapType _baseTrapType; 5772223SN/A static FaultPriority _priority; 5782223SN/A static FaultStat _count; 5792612SN/A uint64_t syscall_num; 5802223SN/A TrapType baseTrapType() {return _baseTrapType;} 5812223SN/A public: 5822612SN/A TrapInstruction(uint32_t n, uint64_t syscall) : 5832612SN/A EnumeratedFault(n), syscall_num(syscall) {;} 5842223SN/A FaultName name() {return _name;} 5852223SN/A FaultPriority priority() {return _priority;} 5862223SN/A FaultStat & countStat() {return _count;} 5872612SN/A#if !FULL_SYSTEM 5882680Sktlim@umich.edu void invoke(ThreadContext * tc); 5892523SN/A#endif 5902523SN/A}; 5912523SN/A 5922223SN/A} // SparcISA namespace 5932221SN/A 5942221SN/A#endif // __FAULTS_HH__ 595