summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/checker/thread_context.hh2
-rw-r--r--src/cpu/o3/thread_context.hh6
-rw-r--r--src/cpu/simple_thread.hh2
-rw-r--r--src/cpu/thread_context.hh5
4 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh
index 9c8469cc0..d88c9b250 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -121,6 +121,8 @@ class CheckerThreadContext : public ThreadContext
return checkerCPU;
}
+ TheISA::ISA *getIsaPtr() override { return actualTC->getIsaPtr(); }
+
TheISA::Decoder *getDecoderPtr() override {
return actualTC->getDecoderPtr();
}
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 022e71291..374ef377d 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -86,6 +86,12 @@ class O3ThreadContext : public ThreadContext
CheckerCPU *getCheckerCpuPtr() override { return NULL; }
+ TheISA::ISA *
+ getIsaPtr() override
+ {
+ return cpu->isa[thread->threadId()];
+ }
+
TheISA::Decoder *
getDecoderPtr() override
{
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 3dddc6768..53aa9d7b7 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -203,6 +203,8 @@ class SimpleThread : public ThreadState
CheckerCPU *getCheckerCpuPtr() { return NULL; }
+ TheISA::ISA *getIsaPtr() { return isa; }
+
TheISA::Decoder *getDecoderPtr() { return &decoder; }
System *getSystemPtr() { return system; }
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 6b9ff1a12..2a991f68f 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -57,6 +57,7 @@
// DTB pointers.
namespace TheISA
{
+ class ISA;
class Decoder;
}
class BaseCPU;
@@ -143,6 +144,8 @@ class ThreadContext
virtual CheckerCPU *getCheckerCpuPtr() = 0;
+ virtual TheISA::ISA *getIsaPtr() = 0;
+
virtual TheISA::Decoder *getDecoderPtr() = 0;
virtual System *getSystemPtr() = 0;
@@ -406,6 +409,8 @@ class ProxyThreadContext : public ThreadContext
CheckerCPU *getCheckerCpuPtr() { return actualTC->getCheckerCpuPtr(); }
+ TheISA::ISA *getIsaPtr() { return actualTC->getIsaPtr(); }
+
TheISA::Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
System *getSystemPtr() { return actualTC->getSystemPtr(); }