From: Gabe Black Date: Tue, 4 Feb 2020 00:36:04 +0000 (-0800) Subject: cpu: Make getIsaPtr return a BaseISA pointer. X-Git-Tag: v19.0.0.0~45 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e2b5c15f193c02e607d5d8fd9c09a0a9a5efc213;p=gem5.git 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 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini --- diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh b/src/arch/arm/fastmodel/iris/thread_context.hh index 5d6827cc9..5590f7fd2 100644 --- a/src/arch/arm/fastmodel/iris/thread_context.hh +++ b/src/arch/arm/fastmodel/iris/thread_context.hh @@ -209,7 +209,7 @@ class ThreadContext : public ::ThreadContext System *getSystemPtr() override { return _cpu->system; } - ArmISA::ISA * + BaseISA * getIsaPtr() override { panic("%s not implemented.", __FUNCTION__); diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh index 0fb75562a..e01a00d37 100644 --- a/src/cpu/checker/thread_context.hh +++ b/src/cpu/checker/thread_context.hh @@ -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 diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh index a01c05413..9607f730f 100644 --- a/src/cpu/o3/thread_context.hh +++ b/src/cpu/o3/thread_context.hh @@ -113,7 +113,7 @@ class O3ThreadContext : public ThreadContext CheckerCPU *getCheckerCpuPtr() override { return NULL; } - TheISA::ISA * + BaseISA * getIsaPtr() override { return cpu->isa[thread->threadId()]; diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index b4afcbbc8..fabcbb83b 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -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; } diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index c14161d6f..fcf39f932 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -47,6 +47,7 @@ #include #include +#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;