From: Gabe Black Date: Mon, 7 Dec 2020 12:19:52 +0000 (-0800) Subject: cpu: Remove the default, globally sized index arrays from StaticInst. X-Git-Tag: develop-gem5-snapshot~279 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e836993db91231fa22f94fa1dec3ac392464edb;p=gem5.git 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 Maintainer: Giacomo Travaglini Tested-by: kokoro --- diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh index e5d9753fe..25a49b328 100644 --- a/src/cpu/static_inst.hh +++ b/src/cpu/static_inst.hh @@ -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(&StaticInst::_srcRegIdx)), - _destRegIdxPtr( - reinterpret_cast(&StaticInst::_destRegIdx)), - _opClass(__opClass), + : _opClass(__opClass), _numSrcRegs(0), _numDestRegs(0), _numFPDestRegs(0), _numIntDestRegs(0), _numCCDestRegs(0), _numVecDestRegs(0), _numVecElemDestRegs(0), _numVecPredDestRegs(0), machInst(_machInst),