From 5e61828571b880ad933d2e71224932788618deb2 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 1 Nov 2020 03:46:22 -0800 Subject: [PATCH] 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 --- src/cpu/static_inst.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.30.2