X86: Define a noop ExtMachInst.
[gem5.git] / src / arch / mips / faults.hh
index 84c94458645ae2919fcac6b077fb42cf970b5dbf..7a001d390bac93812804aeee165b4abd50818196 100644 (file)
@@ -1,38 +1,33 @@
 /*
- * Copyright \eN) 2007 MIPS Technologies, Inc.  All Rights Reserved
+ * Copyright (c) 2003-2005 The Regents of The University of Michigan
+ * Copyright (c) 2007 MIPS Technologies, Inc.
+ * All rights reserved.
  *
- * This software is part of the M5 simulator.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
  *
- * THIS IS A LEGAL AGREEMENT.  BY DOWNLOADING, USING, COPYING, CREATING
- * DERIVATIVE WORKS, AND/OR DISTRIBUTING THIS SOFTWARE YOU ARE AGREEING
- * TO THESE TERMS AND CONDITIONS.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * Permission is granted to use, copy, create derivative works and
- * distribute this software and such derivative works for any purpose,
- * so long as (1) the copyright notice above, this grant of permission,
- * and the disclaimer below appear in all copies and derivative works
- * made, (2) the copyright notice above is augmented as appropriate to
- * reflect the addition of any new copyrightable work in a derivative
- * work (e.g., Copyright \eN) <Publication Year> Copyright Owner), and (3)
- * the name of MIPS Technologies, Inc. (\e$(B!H\e(BMIPS\e$(B!I\e(B) is not used in any
- * advertising or publicity pertaining to the use or distribution of
- * this software without specific, written prior authorization.
- *
- * THIS SOFTWARE IS PROVIDED \e$(B!H\e(BAS IS.\e$(B!I\e(B  MIPS MAKES NO WARRANTIES AND
- * DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, STATUTORY, IMPLIED OR
- * OTHERWISE, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
- * NON-INFRINGEMENT OF THIRD PARTY RIGHTS, REGARDING THIS SOFTWARE.
- * IN NO EVENT SHALL MIPS BE LIABLE FOR ANY DAMAGES, INCLUDING DIRECT,
- * INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, OR PUNITIVE DAMAGES OF
- * ANY KIND OR NATURE, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT,
- * THIS SOFTWARE AND/OR THE USE OF THIS SOFTWARE, WHETHER SUCH LIABILITY
- * IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR
- * STRICT LIABILITY), OR OTHERWISE, EVEN IF MIPS HAS BEEN WARNED OF THE
- * POSSIBILITY OF ANY SUCH LOSS OR DAMAGE IN ADVANCE.
- *
- * Authors: Gabe M. Black
- *          Korey L. Sewell
+ * Authors: Gabe Black
+ *          Korey Sewell
  *          Jaidev Patwardhan
  */
 
 
 #include "sim/faults.hh"
 
-// The design of the "name" and "vect" functions is in sim/faults.hh
-
 namespace MipsISA
 {
+
 typedef const Addr FaultVect;
 
 class MipsFault : public FaultBase
@@ -53,15 +47,15 @@ class MipsFault : public FaultBase
     virtual bool skipFaultingInstruction() {return false;}
     virtual bool setRestartAddress() {return true;}
   public:
-    Addr BadVAddr;
-    Addr EntryHi_Asid;
-    Addr EntryHi_VPN2;
-    Addr EntryHi_VPN2X;
-    Addr Context_BadVPN2;
+    Addr badVAddr;
+    Addr entryHiAsid;
+    Addr entryHiVPN2;
+    Addr entryHiVPN2X;
+    Addr contextBadVPN2;
 #if FULL_SYSTEM
-  void invoke(ThreadContext * tc) {};
-  void setExceptionState(ThreadContext *,uint8_t);
-  void setHandlerPC(Addr,ThreadContext *);
+    void invoke(ThreadContext * tc) {};
+    void setExceptionState(ThreadContext *, uint8_t);
+    void setHandlerPC(Addr, ThreadContext *);
 #endif
     virtual FaultVect vect() = 0;
     virtual FaultStat & countStat() = 0;
@@ -121,6 +115,7 @@ class AddressErrorFault : public MipsFault
 #endif
 
 };
+
 class StoreAddressErrorFault : public MipsFault
 {
   private:
@@ -134,8 +129,8 @@ class StoreAddressErrorFault : public MipsFault
 #if FULL_SYSTEM
     void invoke(ThreadContext * tc);
 #endif
-
 };
+
 class UnimplementedOpcodeFault : public MipsFault
 {
   private:
@@ -162,6 +157,7 @@ class TLBRefillIFetchFault : public MipsFault
     FaultStat & countStat() {return _count;}
     void invoke(ThreadContext * tc);
 };
+
 class TLBInvalidIFetchFault : public MipsFault
 {
   private:
@@ -264,6 +260,7 @@ class ResetFault : public MipsFault
     void invoke(ThreadContext * tc);
 
 };
+
 class SystemCallFault : public MipsFault
 {
   private:
@@ -289,6 +286,7 @@ class SoftResetFault : public MipsFault
     FaultStat & countStat() {return _count;}
     void invoke(ThreadContext * tc);
 };
+
 class DebugSingleStep : public MipsFault
 {
   private:
@@ -301,6 +299,7 @@ class DebugSingleStep : public MipsFault
     FaultStat & countStat() {return _count;}
     void invoke(ThreadContext * tc);
 };
+
 class DebugInterrupt : public MipsFault
 {
   private:
@@ -355,7 +354,6 @@ class ThreadFault : public MipsFault
     void invoke(ThreadContext * tc);
 };
 
-
 class ArithmeticFault : public MipsFault
 {
   protected:
@@ -389,8 +387,6 @@ class InterruptFault : public MipsFault
 #if FULL_SYSTEM
     void invoke(ThreadContext * tc);
 #endif
-
-    //void invoke(ThreadContext * tc);
 };
 
 class TrapFault : public MipsFault
@@ -437,6 +433,7 @@ class ItbRefillFault : public MipsFault
     void invoke(ThreadContext * tc);
 #endif
 };
+
 class DtbRefillFault : public MipsFault
 {
   private:
@@ -480,8 +477,8 @@ class ItbInvalidFault : public MipsFault
 #if FULL_SYSTEM
     void invoke(ThreadContext * tc);
 #endif
-
 };
+
 class TLBModifiedFault : public MipsFault
 {
   private:
@@ -495,7 +492,6 @@ class TLBModifiedFault : public MipsFault
 #if FULL_SYSTEM
     void invoke(ThreadContext * tc);
 #endif
-
 };
 
 class DtbInvalidFault : public MipsFault
@@ -511,7 +507,6 @@ class DtbInvalidFault : public MipsFault
 #if FULL_SYSTEM
     void invoke(ThreadContext * tc);
 #endif
-
 };
 
 class FloatEnableFault : public MipsFault