From 753adb38d5471d23315d1bcfc6a744d1c6e03975 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Fri, 22 Jun 2007 19:03:42 -0400 Subject: mips import pt. 1 src/arch/mips/SConscript: "mips import pt.1". --HG-- extra : convert_revision : 2e393341938bebf32fb638a209262d074fad4cc1 --- src/cpu/simple/base.hh | 13 +++++++++++++ src/cpu/simple_thread.hh | 8 ++++---- src/cpu/thread_context.hh | 4 ++++ 3 files changed, 21 insertions(+), 4 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index d221baca8..243167db0 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -215,6 +215,7 @@ class BaseSimpleCPU : public BaseCPU // need to do this... } + Fault copySrcTranslate(Addr src); Fault copy(Addr dest); @@ -353,6 +354,18 @@ class BaseSimpleCPU : public BaseCPU thread->setStCondFailures(sc_failures); } + MiscReg readRegOtherThread(int regIdx, int tid = -1) + { + panic("Simple CPU models do not support multithreaded " + "register access.\n"); + } + + void setRegOtherThread(int regIdx, const MiscReg &val, int tid = -1) + { + panic("Simple CPU models do not support multithreaded " + "register access.\n"); + } + #if FULL_SYSTEM Fault hwrei() { return thread->hwrei(); } void ev5_trap(Fault fault) { fault->invoke(tc); } diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index 95848ee2c..c20fe3d90 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -349,22 +349,22 @@ class SimpleThread : public ThreadState regs.setNextNPC(val); } - MiscReg readMiscRegNoEffect(int misc_reg) + MiscReg readMiscRegNoEffect(int misc_reg, unsigned tid = 0) { return regs.readMiscRegNoEffect(misc_reg); } - MiscReg readMiscReg(int misc_reg) + MiscReg readMiscReg(int misc_reg, unsigned tid = 0) { return regs.readMiscReg(misc_reg, tc); } - void setMiscRegNoEffect(int misc_reg, const MiscReg &val) + void setMiscRegNoEffect(int misc_reg, const MiscReg &val, unsigned tid = 0) { return regs.setMiscRegNoEffect(misc_reg, val); } - void setMiscReg(int misc_reg, const MiscReg &val) + void setMiscReg(int misc_reg, const MiscReg &val, unsigned tid = 0) { return regs.setMiscReg(misc_reg, val, tc); } diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index 05c409c95..3706d8543 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -234,6 +234,10 @@ class ThreadContext virtual void setMiscReg(int misc_reg, const MiscReg &val) = 0; + virtual uint64_t readRegOtherThread(int misc_reg, unsigned tid) { return 0; } + + virtual void setRegOtherThread(int misc_reg, const MiscReg &val, unsigned tid) { }; + // Also not necessarily the best location for these two. Hopefully will go // away once we decide upon where st cond failures goes. virtual unsigned readStCondFailures() = 0; -- cgit v1.2.3