summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-11-10 18:37:19 -0500
committerNathan Binkert <binkertn@umich.edu>2004-11-10 18:37:19 -0500
commit4328480b5602decbcc7239e1884324ce23eaa3ec (patch)
treecdc6f1676b0a4faba383af8a2928c49101932ac7 /arch
parent4524eb0b2857b78329f8dd75c84cf89b63359c57 (diff)
downloadgem5-4328480b5602decbcc7239e1884324ce23eaa3ec.tar.xz
Don't use the global check_interrupts variable. Add a per-cpu
checkInterrupts variable and use that to determine whether an interrupt can occur on a given cycle. arch/alpha/ev5.cc: XC -> CPU (and xc -> CPU) since we're really talking about a CPU here Don't use the global check_interrupts variable. Add a per-cpu checkInterrupts variable and use that to determine whether an interrupt can occur on a given cycle. --HG-- extra : convert_revision : be4c0247e5834005c60a45796a222cffd327b64e
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/ev5.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc
index 8b95e8b3d..aa52916b9 100644
--- a/arch/alpha/ev5.cc
+++ b/arch/alpha/ev5.cc
@@ -101,17 +101,17 @@ AlphaISA::initIPRs(RegFile *regs)
}
-template <class XC>
+template <class CPU>
void
-AlphaISA::processInterrupts(XC *xc)
+AlphaISA::processInterrupts(CPU *cpu)
{
//Check if there are any outstanding interrupts
//Handle the interrupts
int ipl = 0;
int summary = 0;
- IntReg *ipr = xc->getIprPtr();
+ IntReg *ipr = cpu->getIprPtr();
- check_interrupts = 0;
+ cpu->checkInterrupts = false;
if (ipr[IPR_ASTRR])
panic("asynchronous traps not implemented\n");
@@ -127,7 +127,7 @@ AlphaISA::processInterrupts(XC *xc)
}
}
- uint64_t interrupts = xc->intr_status();
+ uint64_t interrupts = cpu->intr_status();
if (interrupts) {
for (int i = INTLEVEL_EXTERNAL_MIN;
@@ -143,22 +143,22 @@ AlphaISA::processInterrupts(XC *xc)
if (ipl && ipl > ipr[IPR_IPLR]) {
ipr[IPR_ISR] = summary;
ipr[IPR_INTID] = ipl;
- xc->trap(Interrupt_Fault);
+ cpu->trap(Interrupt_Fault);
DPRINTF(Flow, "Interrupt! IPLR=%d ipl=%d summary=%x\n",
ipr[IPR_IPLR], ipl, summary);
}
}
-template <class XC>
+template <class CPU>
void
-AlphaISA::zeroRegisters(XC *xc)
+AlphaISA::zeroRegisters(CPU *cpu)
{
// Insure ISA semantics
// (no longer very clean due to the change in setIntReg() in the
// cpu model. Consider changing later.)
- xc->xc->setIntReg(ZeroReg, 0);
- xc->xc->setFloatRegDouble(ZeroReg, 0.0);
+ cpu->xc->setIntReg(ZeroReg, 0);
+ cpu->xc->setFloatRegDouble(ZeroReg, 0.0);
}
void
@@ -220,8 +220,6 @@ AlphaISA::intr_post(RegFile *regs, Fault fault, Addr pc)
// that's it! (orders of magnitude less painful than x86)
}
-bool AlphaISA::check_interrupts = false;
-
Fault
ExecContext::hwrei()
{
@@ -238,7 +236,7 @@ ExecContext::hwrei()
if ((ipr[AlphaISA::IPR_EXC_ADDR] & 1) == 0)
AlphaISA::swap_palshadow(&regs, false);
- AlphaISA::check_interrupts = true;
+ cpu->checkInterrupts = true;
}
// FIXME: XXX check for interrupts? XXX