From cb437cf29f597a7434e7eeb128447e8c1f84f329 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Tue, 26 Jan 2021 10:54:30 +0000 Subject: [PATCH] arch-arm: Add destRegIdxArr arrays to TME instructions This is needed as the base StaticInst class is no longer holding the index array and it is up to the derived class to allocate the storage depending on the number of registers used Change-Id: I389e39a7e09d31f370d63a6e61fe6ee3faaac7db Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40375 Reviewed-by: Gabe Black Tested-by: kokoro --- src/arch/arm/insts/tme64.cc | 14 +++++++++++++- src/arch/arm/insts/tme64.hh | 8 +++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/insts/tme64.cc b/src/arch/arm/insts/tme64.cc index d32e8c9f8..85ffd6dfb 100644 --- a/src/arch/arm/insts/tme64.cc +++ b/src/arch/arm/insts/tme64.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 ARM Limited + * Copyright (c) 2020-2021 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -116,6 +116,12 @@ MicroTfence64::completeAcc(PacketPtr pkt, ExecContext *xc, Tstart64::Tstart64(ExtMachInst machInst, IntRegIndex _dest) : TmeRegNone64("tstart", machInst, MemReadOp, _dest) { + setRegIdxArrays( + nullptr, + reinterpret_cast( + &std::remove_pointer_t::destRegIdxArr)); + ; + _numSrcRegs = 0; _numDestRegs = 0; _numFPDestRegs = 0; @@ -144,6 +150,12 @@ Tstart64::execute( Ttest64::Ttest64(ExtMachInst machInst, IntRegIndex _dest) : TmeRegNone64("ttest", machInst, MemReadOp, _dest) { + setRegIdxArrays( + nullptr, + reinterpret_cast( + &std::remove_pointer_t::destRegIdxArr)); + ; + _numSrcRegs = 0; _numDestRegs = 0; _numFPDestRegs = 0; diff --git a/src/arch/arm/insts/tme64.hh b/src/arch/arm/insts/tme64.hh index b75adc1e6..0a1e02cfd 100644 --- a/src/arch/arm/insts/tme64.hh +++ b/src/arch/arm/insts/tme64.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 ARM Limited + * Copyright (c) 2020-2021 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -97,6 +97,9 @@ class TmeRegNone64 : public ArmISA::ArmStaticInst class Tstart64 : public TmeRegNone64 { + private: + RegId destRegIdxArr[1]; + public: Tstart64(ArmISA::ExtMachInst, ArmISA::IntRegIndex); @@ -107,6 +110,9 @@ class Tstart64 : public TmeRegNone64 class Ttest64 : public TmeRegNone64 { + private: + RegId destRegIdxArr[1]; + public: Ttest64(ArmISA::ExtMachInst, ArmISA::IntRegIndex); -- 2.30.2