faults.hh (5895:569e3b31a868) | faults.hh (5909:ecbd27e5d1f8) |
---|---|
1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 48 unchanged lines hidden (view full) --- 57 58#ifndef __ARCH_X86_FAULTS_HH__ 59#define __ARCH_X86_FAULTS_HH__ 60 61#include "base/bitunion.hh" 62#include "base/misc.hh" 63#include "sim/faults.hh" 64 | 1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 48 unchanged lines hidden (view full) --- 57 58#ifndef __ARCH_X86_FAULTS_HH__ 59#define __ARCH_X86_FAULTS_HH__ 60 61#include "base/bitunion.hh" 62#include "base/misc.hh" 63#include "sim/faults.hh" 64 |
65#include <string> 66 |
|
65namespace X86ISA 66{ 67 // Base class for all x86 "faults" where faults is in the m5 sense 68 class X86FaultBase : public FaultBase 69 { 70 protected: 71 const char * faultName; 72 const char * mnem; --- 24 unchanged lines hidden (view full) --- 97 98 virtual bool isSoft() 99 { 100 return false; 101 } 102 103#if FULL_SYSTEM 104 void invoke(ThreadContext * tc); | 67namespace X86ISA 68{ 69 // Base class for all x86 "faults" where faults is in the m5 sense 70 class X86FaultBase : public FaultBase 71 { 72 protected: 73 const char * faultName; 74 const char * mnem; --- 24 unchanged lines hidden (view full) --- 99 100 virtual bool isSoft() 101 { 102 return false; 103 } 104 105#if FULL_SYSTEM 106 void invoke(ThreadContext * tc); |
107 108 virtual std::string describe() const; |
|
105#endif 106 }; 107 108 // Base class for x86 faults which behave as if the underlying instruction 109 // didn't happen. 110 class X86Fault : public X86FaultBase 111 { 112 protected: --- 224 unchanged lines hidden (view full) --- 337 code.user = user; 338 code.reserved = reserved; 339 code.fetch = fetch; 340 errorCode = code; 341 } 342 343#if FULL_SYSTEM 344 void invoke(ThreadContext * tc); | 109#endif 110 }; 111 112 // Base class for x86 faults which behave as if the underlying instruction 113 // didn't happen. 114 class X86Fault : public X86FaultBase 115 { 116 protected: --- 224 unchanged lines hidden (view full) --- 341 code.user = user; 342 code.reserved = reserved; 343 code.fetch = fetch; 344 errorCode = code; 345 } 346 347#if FULL_SYSTEM 348 void invoke(ThreadContext * tc); |
349 350 virtual std::string describe() const; |
|
345#endif 346 }; 347 348 class X87FpExceptionPending : public X86Fault 349 { 350 public: 351 X87FpExceptionPending() : 352 X86Fault("x87 Floating-Point Exception Pending", "#MF", 16) --- 56 unchanged lines hidden (view full) --- 409 X86Interrupt("INIT Interrupt", "#INIT", _vector) 410 {} 411 }; 412 413 class SoftwareInterrupt : public X86Interrupt 414 { 415 public: 416 SoftwareInterrupt(uint8_t _vector) : | 351#endif 352 }; 353 354 class X87FpExceptionPending : public X86Fault 355 { 356 public: 357 X87FpExceptionPending() : 358 X86Fault("x87 Floating-Point Exception Pending", "#MF", 16) --- 56 unchanged lines hidden (view full) --- 415 X86Interrupt("INIT Interrupt", "#INIT", _vector) 416 {} 417 }; 418 419 class SoftwareInterrupt : public X86Interrupt 420 { 421 public: 422 SoftwareInterrupt(uint8_t _vector) : |
417 X86Interrupt("Software Interrupt", "INTn", _vector) | 423 X86Interrupt("Software Interrupt", "#INTR", _vector) |
418 {} 419 420 bool isSoft() 421 { 422 return true; 423 } 424 }; 425}; 426 427#endif // __ARCH_X86_FAULTS_HH__ | 424 {} 425 426 bool isSoft() 427 { 428 return true; 429 } 430 }; 431}; 432 433#endif // __ARCH_X86_FAULTS_HH__ |