diff options
Diffstat (limited to 'src/arch/alpha')
-rw-r--r-- | src/arch/alpha/ev5.cc | 2 | ||||
-rw-r--r-- | src/arch/alpha/faults.cc | 2 | ||||
-rw-r--r-- | src/arch/alpha/interrupts.hh | 15 |
3 files changed, 7 insertions, 12 deletions
diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc index 314b445e0..dca948bbd 100644 --- a/src/arch/alpha/ev5.cc +++ b/src/arch/alpha/ev5.cc @@ -147,7 +147,7 @@ AlphaISA::zeroRegisters(CPU *cpu) Fault SimpleThread::hwrei() { - if (!inPalMode()) + if (!(readPC() & 0x3)) return new UnimplementedOpcodeFault; setNextPC(readMiscReg(AlphaISA::IPR_EXC_ADDR)); diff --git a/src/arch/alpha/faults.cc b/src/arch/alpha/faults.cc index 7179bf025..5efcf92e4 100644 --- a/src/arch/alpha/faults.cc +++ b/src/arch/alpha/faults.cc @@ -125,7 +125,7 @@ void AlphaFault::invoke(ThreadContext * tc) countStat()++; // exception restart address - if (setRestartAddress() || !tc->inPalMode()) + if (setRestartAddress() || !(tc->readPC() & 0x3)) tc->setMiscReg(AlphaISA::IPR_EXC_ADDR, tc->readPC()); if (skipFaultingInstruction()) { diff --git a/src/arch/alpha/interrupts.hh b/src/arch/alpha/interrupts.hh index 2f031f434..75031ae47 100644 --- a/src/arch/alpha/interrupts.hh +++ b/src/arch/alpha/interrupts.hh @@ -88,15 +88,6 @@ namespace AlphaISA intstatus = 0; } - bool check_interrupt(int int_num) const { - if (int_num > NumInterruptLevels) - panic("int_num out of bounds\n"); - - return interrupts[int_num] != 0; - } - - bool check_interrupts() const { return intstatus != 0; } - void serialize(std::ostream &os) { SERIALIZE_ARRAY(interrupts, NumInterruptLevels); @@ -109,6 +100,11 @@ namespace AlphaISA UNSERIALIZE_SCALAR(intstatus); } + bool check_interrupts(ThreadContext * tc) const + { + return (intstatus != 0) && !(tc->readPC() & 0x3); + } + Fault getInterrupt(ThreadContext * tc) { int ipl = 0; @@ -163,7 +159,6 @@ namespace AlphaISA } private: - uint64_t intr_status() const { return intstatus; } }; } |