From b438ec2b1cd563eeb935d22b41a698f1f12cd1b3 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 12 Aug 2020 14:36:07 +0100 Subject: [PATCH] arch-arm: Remove setters from SoftwareStep Motivation: Those helpers are used and meant to be used by the parent (SelfDebug) class only. There is no point on exposing them to the outer world. Better to make SelfDebug a friend class and to allow it to access children's private data. Change-Id: Ib945b1aa46742b90062ce7a5de563f164127075f Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32774 Reviewed-by: Richard Cooper Tested-by: kokoro --- src/arch/arm/self_debug.hh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/arch/arm/self_debug.hh b/src/arch/arm/self_debug.hh index 7a96d4203..c9afa609f 100644 --- a/src/arch/arm/self_debug.hh +++ b/src/arch/arm/self_debug.hh @@ -204,6 +204,8 @@ class SoftwareStep bool cpsrD; public: + friend class SelfDebug; + SoftwareStep(SelfDebug *s) : bSS(false), stateSS(INACTIVE_STATE), conf(s), steppedLdx(false) @@ -213,18 +215,6 @@ class SoftwareStep ExceptionLevel dest); bool advanceSS(ThreadContext *tc); - inline void - setCPSRD(bool val) - { - cpsrD = val; - } - - inline void - setEnableSS(bool val) - { - bSS = val; - } - void setLdx() { @@ -391,7 +381,7 @@ class SelfDebug { enableFlag = bits(val, 15); bKDE = bits(val, 13); - softStep->setEnableSS((bool)bits(val, 0)); + softStep->bSS = bits(val, 0); } inline void @@ -427,7 +417,7 @@ class SelfDebug inline void setDebugMask(bool mask) { - softStep->setCPSRD(mask); + softStep->cpsrD = mask; } inline bool -- 2.30.2