From e17c375ddd32fbbef55a96c446a4b98b20df2ad5 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 4 Jan 2013 19:00:45 -0600 Subject: Decoder: Remove the thread context get/set from the decoder. This interface is no longer used, and getting rid of it simplifies the decoders and code that sets up the decoders. The thread context had been used to read architectural state which was used to contextualize the instruction memory as it came in. That was changed so that the state is now sent to the decoders to keep locally if/when it changes. That's significantly more efficient. Committed by: Nilay Vaish --- src/arch/x86/decoder.cc | 1 - src/arch/x86/decoder.hh | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'src/arch/x86') diff --git a/src/arch/x86/decoder.cc b/src/arch/x86/decoder.cc index 9dcb02902..f42fb28bf 100644 --- a/src/arch/x86/decoder.cc +++ b/src/arch/x86/decoder.cc @@ -33,7 +33,6 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/types.hh" -#include "cpu/thread_context.hh" #include "debug/Decoder.hh" namespace X86ISA diff --git a/src/arch/x86/decoder.hh b/src/arch/x86/decoder.hh index 796f9eef9..6f55ab26f 100644 --- a/src/arch/x86/decoder.hh +++ b/src/arch/x86/decoder.hh @@ -44,8 +44,6 @@ #include "cpu/static_inst.hh" #include "debug/Decoder.hh" -class ThreadContext; - namespace X86ISA { @@ -72,7 +70,6 @@ class Decoder static InstBytes dummy; - ThreadContext * tc; //The bytes to be predecoded MachInst fetchChunk; InstBytes *instBytes; @@ -205,8 +202,7 @@ class Decoder static InstCacheMap instCacheMap; public: - Decoder(ThreadContext * _tc) : - tc(_tc), basePC(0), origPC(0), offset(0), + Decoder() : basePC(0), origPC(0), offset(0), outOfBytes(true), instDone(false), state(ResetState) { @@ -259,16 +255,6 @@ class Decoder state = ResetState; } - ThreadContext * getTC() - { - return tc; - } - - void setTC(ThreadContext * _tc) - { - tc = _tc; - } - void process(); //Use this to give data to the decoder. This should be used -- cgit v1.2.3