diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-10-07 18:17:52 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-10-07 18:17:52 -0700 |
commit | cd36c69a4de51d45b82038a012a53cf58f4f3fa2 (patch) | |
tree | 8e9ffdde9cb4b765534956e2a148b913f5116f2a /src/arch/x86/faults.hh | |
parent | efbff349a92ac8a8a994a67d1fda2ec103ec5225 (diff) | |
download | gem5-cd36c69a4de51d45b82038a012a53cf58f4f3fa2.tar.xz |
X86: Make faults maintain an error code which gets pushed on the stack.
--HG--
extra : convert_revision : 7576f8cfaec9ddfb65e6ba7a6f64a5f453a42069
Diffstat (limited to 'src/arch/x86/faults.hh')
-rw-r--r-- | src/arch/x86/faults.hh | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/arch/x86/faults.hh b/src/arch/x86/faults.hh index 0579be9b5..5a573754a 100644 --- a/src/arch/x86/faults.hh +++ b/src/arch/x86/faults.hh @@ -69,9 +69,11 @@ namespace X86ISA protected: const char * faultName; const char * mnem; + uint64_t errorCode; - X86FaultBase(const char * _faultName, const char * _mnem) : - faultName(_faultName), mnem(_mnem) + X86FaultBase(const char * _faultName, const char * _mnem, + uint64_t _errorCode = 0) : + faultName(_faultName), mnem(_mnem), errorCode(_errorCode) { } @@ -96,8 +98,9 @@ namespace X86ISA class X86Fault : public X86FaultBase { protected: - X86Fault(const char * name, const char * mnem) : - X86FaultBase(name, mnem) + X86Fault(const char * name, const char * mnem, + uint64_t _errorCode = 0) : + X86FaultBase(name, mnem, _errorCode) {} }; @@ -106,8 +109,9 @@ namespace X86ISA class X86Trap : public X86FaultBase { protected: - X86Trap(const char * name, const char * mnem) : - X86FaultBase(name, mnem) + X86Trap(const char * name, const char * mnem, + uint64_t _errorCode = 0) : + X86FaultBase(name, mnem, _errorCode) {} #if FULL_SYSTEM @@ -119,8 +123,9 @@ namespace X86ISA class X86Abort : public X86FaultBase { protected: - X86Abort(const char * name, const char * mnem) : - X86FaultBase(name, mnem) + X86Abort(const char * name, const char * mnem, + uint64_t _errorCode = 0) : + X86FaultBase(name, mnem, _errorCode) {} #if FULL_SYSTEM @@ -132,8 +137,9 @@ namespace X86ISA class X86Interrupt : public X86FaultBase { protected: - X86Interrupt(const char * name, const char * mnem) : - X86FaultBase(name, mnem) + X86Interrupt(const char * name, const char * mnem, + uint64_t _errorCode = 0) : + X86FaultBase(name, mnem, _errorCode) {} #if FULL_SYSTEM @@ -290,8 +296,8 @@ namespace X86ISA class GeneralProtection : public X86Fault { public: - GeneralProtection() : - X86Fault("General-Protection", "#GP") + GeneralProtection(uint64_t _errorCode) : + X86Fault("General-Protection", "#GP", _errorCode) {} }; |