It makes more sense if interrupts default to enabled.
This commit is contained in:
@@ -60,7 +60,7 @@ bool Core::running() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Warp::Warp(Core *c, Word id) :
|
Warp::Warp(Core *c, Word id) :
|
||||||
core(c), pc(0), interruptEnable(false),
|
core(c), pc(0), interruptEnable(true),
|
||||||
supervisorMode(true), activeThreads(0), reg(0), pred(0),
|
supervisorMode(true), activeThreads(0), reg(0), pred(0),
|
||||||
shadowReg(core->a.getNRegs()), shadowPReg(core->a.getNPRegs()), id(id),
|
shadowReg(core->a.getNRegs()), shadowPReg(core->a.getNPRegs()), id(id),
|
||||||
spawned(false)
|
spawned(false)
|
||||||
@@ -136,13 +136,16 @@ void Warp::step() {
|
|||||||
try {
|
try {
|
||||||
inst->executeOn(*this);
|
inst->executeOn(*this);
|
||||||
} catch (MemoryUnit::PageFault pf) {
|
} catch (MemoryUnit::PageFault pf) {
|
||||||
|
D(2, "Interrupt: Page fault");
|
||||||
pc -= decPos; /* Reset to beginning of faulting address. */
|
pc -= decPos; /* Reset to beginning of faulting address. */
|
||||||
interrupt(pf.notFound?1:2);
|
interrupt(pf.notFound?1:2);
|
||||||
reg[0][1] = pf.faultAddr;
|
reg[0][1] = pf.faultAddr;
|
||||||
} catch (DivergentBranchException e) {
|
} catch (DivergentBranchException e) {
|
||||||
|
D(2, "Interrupt 4: Divergent branch");
|
||||||
pc -= decPos;
|
pc -= decPos;
|
||||||
interrupt(4);
|
interrupt(4);
|
||||||
} catch (DomainException e) {
|
} catch (DomainException e) {
|
||||||
|
D(2, "Interrupt: DomainException");
|
||||||
interrupt(5);
|
interrupt(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user