Attention is currently required from: Richard Cooper.
Hello Richard Cooper,
I'd like you to do a code review.
Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/70718?usp=email
to review the following change.
Change subject: arch-arm: Improve debugging of CC regs accesses
......................................................................
arch-arm: Improve debugging of CC regs accesses
As of now we are simply printing the CC reg index which is
not particularly helpful. With this patch we actually print
the (NZ|C|V) reg name.
Change-Id: Ib4b56a372b25e5bc2b6b762d2ef3ff2084097cce
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Richard Cooper <richard.coo...@arm.com>
---
M src/arch/arm/regs/cc.hh
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/arch/arm/regs/cc.hh b/src/arch/arm/regs/cc.hh
index ba75527..474e48e 100644
--- a/src/arch/arm/regs/cc.hh
+++ b/src/arch/arm/regs/cc.hh
@@ -61,10 +61,31 @@
NumRegs
};
+const char * const RegName[NumRegs] = {
+ "nz",
+ "c",
+ "v",
+ "ge",
+ "fp",
+ "zero"
+};
+
} // namespace cc_reg
-inline constexpr RegClass ccRegClass(CCRegClass, CCRegClassName,
- cc_reg::NumRegs, debug::CCRegs);
+class CCRegClassOps : public RegClassOps
+{
+ public:
+ std::string
+ regName(const RegId &id) const override
+ {
+ return cc_reg::RegName[id.index()];
+ }
+};
+
+static inline CCRegClassOps ccRegClassOps;
+
+inline constexpr RegClass ccRegClass = RegClass(CCRegClass, CCRegClassName,
+ cc_reg::NumRegs, debug::CCRegs).ops(ccRegClassOps);
namespace cc_reg
{
@@ -77,15 +98,6 @@
Fp = ccRegClass[_FpIdx],
Zero = ccRegClass[_ZeroIdx];
-const char * const RegName[NumRegs] = {
- "nz",
- "c",
- "v",
- "ge",
- "fp",
- "zero"
-};
-
} // namespace cc_reg
enum ConditionCode
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70718?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib4b56a372b25e5bc2b6b762d2ef3ff2084097cce
Gerrit-Change-Number: 70718
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Richard Cooper <richard.coo...@arm.com>
Gerrit-Attention: Richard Cooper <richard.coo...@arm.com>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org