arch: Make the decoder reset() method virtual.
This is called very infrequently, and so it's virtual overhead is practically irrelevant. Change-Id: If92cd96f75234c65c4cdffe392c32cfdd9b0c8cb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52074 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -67,11 +67,10 @@ Decoder::Decoder(ISA* isa)
|
||||
void
|
||||
Decoder::reset()
|
||||
{
|
||||
InstDecoder::reset();
|
||||
bigThumb = false;
|
||||
offset = 0;
|
||||
emi = 0;
|
||||
instDone = false;
|
||||
outOfBytes = true;
|
||||
foundIt = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ class Decoder : public InstDecoder
|
||||
Decoder(ISA* isa = nullptr);
|
||||
|
||||
/** Reset the decoders internal state. */
|
||||
void reset();
|
||||
void reset() override;
|
||||
|
||||
/**
|
||||
* Feed data to the decoder.
|
||||
|
||||
@@ -55,6 +55,12 @@ class InstDecoder
|
||||
|
||||
virtual StaticInstPtr fetchRomMicroop(
|
||||
MicroPC micropc, StaticInstPtr curMacroop);
|
||||
virtual void
|
||||
reset()
|
||||
{
|
||||
instDone = false;
|
||||
outOfBytes = true;
|
||||
}
|
||||
|
||||
void *moreBytesPtr() const { return _moreBytesPtr; }
|
||||
size_t moreBytesSize() const { return _moreBytesSize; }
|
||||
|
||||
@@ -60,12 +60,6 @@ class Decoder : public InstDecoder
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
reset()
|
||||
{
|
||||
instDone = false;
|
||||
}
|
||||
|
||||
//Use this to give data to the decoder. This should be used
|
||||
//when there is control flow.
|
||||
void
|
||||
|
||||
@@ -57,12 +57,6 @@ class Decoder : public InstDecoder
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
reset()
|
||||
{
|
||||
instDone = false;
|
||||
}
|
||||
|
||||
// Use this to give data to the predecoder. This should be used
|
||||
// when there is control flow.
|
||||
void
|
||||
|
||||
@@ -42,9 +42,7 @@ void Decoder::reset()
|
||||
{
|
||||
aligned = true;
|
||||
mid = false;
|
||||
outOfBytes = true;
|
||||
emi = 0;
|
||||
instDone = false;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -68,7 +68,7 @@ class Decoder : public InstDecoder
|
||||
Decoder(ISA* isa=nullptr) : InstDecoder(&machInst) { reset(); }
|
||||
|
||||
void process() {}
|
||||
void reset();
|
||||
void reset() override;
|
||||
|
||||
inline bool compressed(ExtMachInst inst) { return (inst & 0x3) < 0x3; }
|
||||
|
||||
|
||||
@@ -56,12 +56,6 @@ class Decoder : public InstDecoder
|
||||
|
||||
void process() {}
|
||||
|
||||
void
|
||||
reset()
|
||||
{
|
||||
instDone = false;
|
||||
}
|
||||
|
||||
// Use this to give data to the predecoder. This should be used
|
||||
// when there is control flow.
|
||||
void
|
||||
|
||||
@@ -302,7 +302,12 @@ class Decoder : public InstDecoder
|
||||
stack = old->stack;
|
||||
}
|
||||
|
||||
void reset() { state = ResetState; }
|
||||
void
|
||||
reset() override
|
||||
{
|
||||
InstDecoder::reset();
|
||||
state = ResetState;
|
||||
}
|
||||
|
||||
void process();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user