diff options
author | Korey Sewell <ksewell@umich.edu> | 2007-11-15 00:14:20 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2007-11-15 00:14:20 -0500 |
commit | 375ddf8d25c3d81a77bd5dd7b70f84a0dbe48fe8 (patch) | |
tree | 525cf56502718b69fb7f0e78162a8d5e63256489 /src/cpu/o3 | |
parent | 2820a448e2bcb861d099b1256087004462b78895 (diff) | |
parent | 7c8e4ca3a3b66becbc3e4e7b5e106f5c44b09b6f (diff) | |
download | gem5-375ddf8d25c3d81a77bd5dd7b70f84a0dbe48fe8.tar.xz |
branch merge
--HG--
extra : convert_revision : 1c56f3c6f2c50d642d2de5ddde83a55234455cec
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/O3CPU.py | 2 | ||||
-rwxr-xr-x | src/cpu/o3/thread_context_impl.hh | 30 |
2 files changed, 30 insertions, 2 deletions
diff --git a/src/cpu/o3/O3CPU.py b/src/cpu/o3/O3CPU.py index 27ca8ce1e..f0284b2cf 100644 --- a/src/cpu/o3/O3CPU.py +++ b/src/cpu/o3/O3CPU.py @@ -58,7 +58,7 @@ class DerivO3CPU(BaseCPU): cachePorts = Param.Unsigned(200, "Cache Ports") icache_port = Port("Instruction Port") dcache_port = Port("Data Port") - _mem_ports = ['icache_port', 'dcache_port'] + _mem_ports = BaseCPU._mem_ports + ['icache_port', 'dcache_port'] decodeToFetchDelay = Param.Unsigned(1, "Decode to fetch delay") renameToFetchDelay = Param.Unsigned(1 ,"Rename to fetch delay") diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index efbbc2329..55584629e 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -289,9 +289,13 @@ O3ThreadContext<Impl>::copyArchRegs(ThreadContext *tc) // Copy the misc regs. TheISA::copyMiscRegs(tc, this); - // Then finally set the PC and the next PC. + // Then finally set the PC, the next PC, the nextNPC, the micropc, and the + // next micropc. cpu->setPC(tc->readPC(), tid); cpu->setNextPC(tc->readNextPC(), tid); + cpu->setNextNPC(tc->readNextNPC(), tid); + cpu->setMicroPC(tc->readMicroPC(), tid); + cpu->setNextMicroPC(tc->readNextMicroPC(), tid); #if !FULL_SYSTEM this->thread->funcExeInst = tc->readFuncExeInst(); #endif @@ -450,6 +454,30 @@ O3ThreadContext<Impl>::setNextPC(uint64_t val) template <class Impl> void +O3ThreadContext<Impl>::setMicroPC(uint64_t val) +{ + cpu->setMicroPC(val, thread->readTid()); + + // Squash if we're not already in a state update mode. + if (!thread->trapPending && !thread->inSyscall) { + cpu->squashFromTC(thread->readTid()); + } +} + +template <class Impl> +void +O3ThreadContext<Impl>::setNextMicroPC(uint64_t val) +{ + cpu->setNextMicroPC(val, thread->readTid()); + + // Squash if we're not already in a state update mode. + if (!thread->trapPending && !thread->inSyscall) { + cpu->squashFromTC(thread->readTid()); + } +} + +template <class Impl> +void O3ThreadContext<Impl>::setMiscRegNoEffect(int misc_reg, const MiscReg &val) { cpu->setMiscRegNoEffect(misc_reg, val, thread->readTid()); |