cpu: Add ISA* getter in Thread interface

This patch is adding a ISA* getter to the TC interface

Change-Id: Ib8ddc5d8fdd44e782f50a2ad15878a6bcf931e58
Reviewed-on: https://gem5-review.googlesource.com/c/16462
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh
index 9c8469c..d88c9b2 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -121,6 +121,8 @@
         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 022e712..374ef37 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -86,6 +86,12 @@
 
     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 3dddc67..53aa9d7 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -203,6 +203,8 @@
 
     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 6b9ff1a..2a991f6 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 @@
 
     virtual CheckerCPU *getCheckerCpuPtr() = 0;
 
+    virtual TheISA::ISA *getIsaPtr() = 0;
+
     virtual TheISA::Decoder *getDecoderPtr() = 0;
 
     virtual System *getSystemPtr() = 0;
@@ -406,6 +409,8 @@
 
     CheckerCPU *getCheckerCpuPtr() { return actualTC->getCheckerCpuPtr(); }
 
+    TheISA::ISA *getIsaPtr() { return actualTC->getIsaPtr(); }
+
     TheISA::Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
 
     System *getSystemPtr() { return actualTC->getSystemPtr(); }