diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-03-09 15:15:55 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-03-09 15:15:55 -0500 |
commit | 91545ac2bf5ac47ecbfc403ef6e2b2ce340ae551 (patch) | |
tree | c01c598d48d60de1c4097d905430b44b9647e224 /cpu | |
parent | 77e40756b723e6cf18462bbb15653792b5c90346 (diff) | |
parent | e30bce8f8e4fdb3dbf4f8161f496c94c85d3d8cf (diff) | |
download | gem5-91545ac2bf5ac47ecbfc403ef6e2b2ce340ae551.tar.xz |
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
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/cpu_exec_context.hh | 11 | ||||
-rw-r--r-- | cpu/simple/cpu.cc | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/cpu/cpu_exec_context.hh b/cpu/cpu_exec_context.hh index e2fbb2368..a5153e618 100644 --- a/cpu/cpu_exec_context.hh +++ b/cpu/cpu_exec_context.hh @@ -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); diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc index fd0163677..8db72b77e 100644 --- a/cpu/simple/cpu.cc +++ b/cpu/simple/cpu.cc @@ -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 |