From: Gabe Black Date: Sun, 1 Nov 2020 11:46:22 +0000 (-0800) Subject: cpu: Add an StaticInst accessor for setting register index storage. X-Git-Tag: develop-gem5-snapshot~450 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e61828571b880ad933d2e71224932788618deb2;p=gem5.git cpu: Add an StaticInst accessor for setting register index storage. Change-Id: I66adccd8851f035b5d61ace9153ae7acc57403ed Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36877 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 22e55ca40..e5d9753fe 100644 --- a/src/cpu/static_inst.hh +++ b/src/cpu/static_inst.hh @@ -270,6 +270,19 @@ class StaticInst : public RefCounted, public StaticInstFlags protected: + /** + * Set the pointers which point to the arrays of source and destination + * register indices. These will be defined in derived classes which know + * what size they need to be, and installed here so they can be accessed + * with the base class accessors. + */ + void + setRegIdxArrays(RegIdArrayPtr src, RegIdArrayPtr dest) + { + _srcRegIdxPtr = src; + _destRegIdxPtr = dest; + } + /** * Base mnemonic (e.g., "add"). Used by generateDisassembly() * methods. Also useful to readily identify instructions from