Merge zizzer.eecs.umich.edu:/z/m5/Bitkeeper/m5

into  zizzer.eecs.umich.edu:/z/m5/Bitkeeper/multiarch

cpu/simple/cpu.cc:
    Hand Merge

--HG--
rename : cpu/exec_context.hh => cpu/cpu_exec_context.hh
extra : convert_revision : bf664b092f993d0f4675ce8e7df13645a920c1f4
This commit is contained in:
Gabe Black
2006-03-09 15:15:55 -05:00
6 changed files with 105 additions and 32 deletions

View File

@@ -445,6 +445,17 @@ class CPUExecContext
regs.npc = val;
}
uint64_t readNextNPC()
{
return regs.nnpc;
}
void setNextNPC(uint64_t val)
{
regs.nnpc = val;
}
MiscReg readMiscReg(int misc_reg)
{
return regs.miscRegs.readReg(misc_reg);

View File

@@ -823,9 +823,17 @@ SimpleCPU::tick()
#endif // FULL_SYSTEM
}
else {
#if THE_ISA != MIPS_ISA
// go to the next instruction
cpuXC->setPC(cpuXC->readNextPC());
cpuXC->setNextPC(cpuXC->readNextPC() + sizeof(MachInst));
#else
// go to the next instruction
cpuXC->setPC(cpuXC->readNextPC());
cpuXC->setNextPC(cpuXC->readNextNPC());
cpuXC->setNextNPC(cpuXC->readNextNPC() + sizeof(MachInst));
#endif
}
#if FULL_SYSTEM