cpu: Make getIsaPtr return a BaseISA pointer.
This isolates the architecture specific ISA types a little bit, and means that ThreadContexts don't *have* to find an architecture specific class to return, even if they don't naturally have one lying around. Change-Id: Ide10b5d945ec6076947b2ccdea87c86e96e40857 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25008 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -209,7 +209,7 @@ class ThreadContext : public ::ThreadContext
|
||||
|
||||
System *getSystemPtr() override { return _cpu->system; }
|
||||
|
||||
ArmISA::ISA *
|
||||
BaseISA *
|
||||
getIsaPtr() override
|
||||
{
|
||||
panic("%s not implemented.", __FUNCTION__);
|
||||
|
||||
@@ -142,7 +142,7 @@ class CheckerThreadContext : public ThreadContext
|
||||
return checkerCPU;
|
||||
}
|
||||
|
||||
TheISA::ISA *getIsaPtr() override { return actualTC->getIsaPtr(); }
|
||||
BaseISA *getIsaPtr() override { return actualTC->getIsaPtr(); }
|
||||
|
||||
TheISA::Decoder *
|
||||
getDecoderPtr() override
|
||||
|
||||
@@ -113,7 +113,7 @@ class O3ThreadContext : public ThreadContext
|
||||
|
||||
CheckerCPU *getCheckerCpuPtr() override { return NULL; }
|
||||
|
||||
TheISA::ISA *
|
||||
BaseISA *
|
||||
getIsaPtr() override
|
||||
{
|
||||
return cpu->isa[thread->threadId()];
|
||||
|
||||
@@ -230,7 +230,7 @@ class SimpleThread : public ThreadState, public ThreadContext
|
||||
|
||||
CheckerCPU *getCheckerCpuPtr() override { return NULL; }
|
||||
|
||||
TheISA::ISA *getIsaPtr() override { return isa; }
|
||||
BaseISA *getIsaPtr() override { return isa; }
|
||||
|
||||
TheISA::Decoder *getDecoderPtr() override { return &decoder; }
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "arch/generic/isa.hh"
|
||||
#include "arch/registers.hh"
|
||||
#include "arch/types.hh"
|
||||
#include "base/types.hh"
|
||||
@@ -141,7 +142,7 @@ class ThreadContext : public PCEventScope
|
||||
|
||||
virtual CheckerCPU *getCheckerCpuPtr() = 0;
|
||||
|
||||
virtual TheISA::ISA *getIsaPtr() = 0;
|
||||
virtual BaseISA *getIsaPtr() = 0;
|
||||
|
||||
virtual TheISA::Decoder *getDecoderPtr() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user