cpu: Remove the default, globally sized index arrays from StaticInst.

All ISAs now allocate their own arrays in all their instructions, making
these arrays unnecessary.

Change-Id: Ie2bc5d7a2903e07703dddd809505cdaaf6c578f5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38382
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-12-07 04:19:52 -08:00
parent d14f37d155
commit 5e836993db

View File

@@ -88,20 +88,13 @@ class StaticInst : public RefCounted, public StaticInstFlags
/// Binary extended machine instruction type.
typedef TheISA::ExtMachInst ExtMachInst;
enum {
MaxInstSrcRegs = TheISA::MaxInstSrcRegs, //< Max source regs
MaxInstDestRegs = TheISA::MaxInstDestRegs //< Max dest regs
};
using RegIdArrayPtr = RegId (StaticInst:: *)[];
private:
/// See srcRegIdx().
RegId _srcRegIdx[MaxInstSrcRegs];
RegIdArrayPtr _srcRegIdxPtr = nullptr;
/// See destRegIdx().
RegId _destRegIdx[MaxInstDestRegs];
RegIdArrayPtr _destRegIdxPtr = nullptr;
protected:
@@ -309,11 +302,7 @@ class StaticInst : public RefCounted, public StaticInstFlags
/// the fields that are meaningful for the particular
/// instruction.
StaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
: _srcRegIdxPtr(
reinterpret_cast<RegIdArrayPtr>(&StaticInst::_srcRegIdx)),
_destRegIdxPtr(
reinterpret_cast<RegIdArrayPtr>(&StaticInst::_destRegIdx)),
_opClass(__opClass),
: _opClass(__opClass),
_numSrcRegs(0), _numDestRegs(0), _numFPDestRegs(0),
_numIntDestRegs(0), _numCCDestRegs(0), _numVecDestRegs(0),
_numVecElemDestRegs(0), _numVecPredDestRegs(0), machInst(_machInst),