Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/53267 )
Change subject: arch-arm: Fix coding style in isa.hh
......................................................................
arch-arm: Fix coding style in isa.hh
Change-Id: Ib827e4ae9662e79512a18c13e1cd262213406fbf
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53267
Reviewed-by: Richard Cooper <richard.coo...@arm.com>
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/arm/isa.hh
1 file changed, 196 insertions(+), 62 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
Richard Cooper: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh
index 2d30ded..645a765 100644
--- a/src/arch/arm/isa.hh
+++ b/src/arch/arm/isa.hh
@@ -119,8 +119,8 @@
uint64_t _rao; // read as one (fixed at 1)
public:
MiscRegLUTEntry() :
- lower(0), upper(0),
- _reset(0), _res0(0), _res1(0), _raz(0), _rao(0) {}
+ lower(0), upper(0),
+ _reset(0), _res0(0), _res1(0), _raz(0), _rao(0) {}
uint64_t reset() const { return _reset; }
uint64_t res0() const { return _res0; }
uint64_t res1() const { return _res1; }
@@ -139,239 +139,343 @@
std::bitset<NUM_MISCREG_INFOS> &info;
typedef const MiscRegLUTEntryInitializer& chain;
public:
- chain mapsTo(uint32_t l, uint32_t u = 0) const {
+ chain
+ mapsTo(uint32_t l, uint32_t u = 0) const
+ {
entry.lower = l;
entry.upper = u;
return *this;
}
- chain res0(uint64_t mask) const {
+ chain
+ res0(uint64_t mask) const
+ {
entry._res0 = mask;
return *this;
}
- chain res1(uint64_t mask) const {
+ chain
+ res1(uint64_t mask) const
+ {
entry._res1 = mask;
return *this;
}
- chain raz(uint64_t mask) const {
+ chain
+ raz(uint64_t mask) const
+ {
entry._raz = mask;
return *this;
}
- chain rao(uint64_t mask) const {
+ chain
+ rao(uint64_t mask) const
+ {
entry._rao = mask;
return *this;
}
- chain implemented(bool v = true) const {
+ chain
+ implemented(bool v = true) const
+ {
info[MISCREG_IMPLEMENTED] = v;
return *this;
}
- chain unimplemented() const {
+ chain
+ unimplemented() const
+ {
return implemented(false);
}
- chain unverifiable(bool v = true) const {
+ chain
+ unverifiable(bool v = true) const
+ {
info[MISCREG_UNVERIFIABLE] = v;
return *this;
}
- chain warnNotFail(bool v = true) const {
+ chain
+ warnNotFail(bool v = true) const
+ {
info[MISCREG_WARN_NOT_FAIL] = v;
return *this;
}
- chain mutex(bool v = true) const {
+ chain
+ mutex(bool v = true) const
+ {
info[MISCREG_MUTEX] = v;
return *this;
}
- chain banked(bool v = true) const {
+ chain
+ banked(bool v = true) const
+ {
info[MISCREG_BANKED] = v;
return *this;
}
- chain banked64(bool v = true) const {
+ chain
+ banked64(bool v = true) const
+ {
info[MISCREG_BANKED64] = v;
return *this;
}
- chain bankedChild(bool v = true) const {
+ chain
+ bankedChild(bool v = true) const
+ {
info[MISCREG_BANKED_CHILD] = v;
return *this;
}
- chain userNonSecureRead(bool v = true) const {
+ chain
+ userNonSecureRead(bool v = true) const
+ {
info[MISCREG_USR_NS_RD] = v;
return *this;
}
- chain userNonSecureWrite(bool v = true) const {
+ chain
+ userNonSecureWrite(bool v = true) const
+ {
info[MISCREG_USR_NS_WR] = v;
return *this;
}
- chain userSecureRead(bool v = true) const {
+ chain
+ userSecureRead(bool v = true) const
+ {
info[MISCREG_USR_S_RD] = v;
return *this;
}
- chain userSecureWrite(bool v = true) const {
+ chain
+ userSecureWrite(bool v = true) const
+ {
info[MISCREG_USR_S_WR] = v;
return *this;
}
- chain user(bool v = true) const {
+ chain
+ user(bool v = true) const
+ {
userNonSecureRead(v);
userNonSecureWrite(v);
userSecureRead(v);
userSecureWrite(v);
return *this;
}
- chain privNonSecureRead(bool v = true) const {
+ chain
+ privNonSecureRead(bool v = true) const
+ {
info[MISCREG_PRI_NS_RD] = v;
return *this;
}
- chain privNonSecureWrite(bool v = true) const {
+ chain
+ privNonSecureWrite(bool v = true) const
+ {
info[MISCREG_PRI_NS_WR] = v;
return *this;
}
- chain privNonSecure(bool v = true) const {
+ chain
+ privNonSecure(bool v = true) const
+ {
privNonSecureRead(v);
privNonSecureWrite(v);
return *this;
}
- chain privSecureRead(bool v = true) const {
+ chain
+ privSecureRead(bool v = true) const
+ {
info[MISCREG_PRI_S_RD] = v;
return *this;
}
- chain privSecureWrite(bool v = true) const {
+ chain
+ privSecureWrite(bool v = true) const
+ {
info[MISCREG_PRI_S_WR] = v;
return *this;
}
- chain privSecure(bool v = true) const {
+ chain
+ privSecure(bool v = true) const
+ {
privSecureRead(v);
privSecureWrite(v);
return *this;
}
- chain priv(bool v = true) const {
+ chain
+ priv(bool v = true) const
+ {
privSecure(v);
privNonSecure(v);
return *this;
}
- chain privRead(bool v = true) const {
+ chain
+ privRead(bool v = true) const
+ {
privSecureRead(v);
privNonSecureRead(v);
return *this;
}
- chain hypE2HSecureRead(bool v = true) const {
+ chain
+ hypE2HSecureRead(bool v = true) const
+ {
info[MISCREG_HYP_E2H_S_RD] = v;
return *this;
}
- chain hypE2HNonSecureRead(bool v = true) const {
+ chain
+ hypE2HNonSecureRead(bool v = true) const
+ {
info[MISCREG_HYP_E2H_NS_RD] = v;
return *this;
}
- chain hypE2HRead(bool v = true) const {
+ chain
+ hypE2HRead(bool v = true) const
+ {
hypE2HSecureRead(v);
hypE2HNonSecureRead(v);
return *this;
}
- chain hypE2HSecureWrite(bool v = true) const {
+ chain
+ hypE2HSecureWrite(bool v = true) const
+ {
info[MISCREG_HYP_E2H_S_WR] = v;
return *this;
}
- chain hypE2HNonSecureWrite(bool v = true) const {
+ chain
+ hypE2HNonSecureWrite(bool v = true) const
+ {
info[MISCREG_HYP_E2H_NS_WR] = v;
return *this;
}
- chain hypE2HWrite(bool v = true) const {
+ chain
+ hypE2HWrite(bool v = true) const
+ {
hypE2HSecureWrite(v);
hypE2HNonSecureWrite(v);
return *this;
}
- chain hypE2H(bool v = true) const {
+ chain
+ hypE2H(bool v = true) const
+ {
hypE2HRead(v);
hypE2HWrite(v);
return *this;
}
- chain hypSecureRead(bool v = true) const {
+ chain
+ hypSecureRead(bool v = true) const
+ {
info[MISCREG_HYP_S_RD] = v;
return *this;
}
- chain hypNonSecureRead(bool v = true) const {
+ chain
+ hypNonSecureRead(bool v = true) const
+ {
info[MISCREG_HYP_NS_RD] = v;
return *this;
}
- chain hypRead(bool v = true) const {
+ chain
+ hypRead(bool v = true) const
+ {
hypE2HRead(v);
hypSecureRead(v);
hypNonSecureRead(v);
return *this;
}
- chain hypSecureWrite(bool v = true) const {
+ chain
+ hypSecureWrite(bool v = true) const
+ {
info[MISCREG_HYP_S_WR] = v;
return *this;
}
- chain hypNonSecureWrite(bool v = true) const {
+ chain
+ hypNonSecureWrite(bool v = true) const
+ {
info[MISCREG_HYP_NS_WR] = v;
return *this;
}
- chain hypWrite(bool v = true) const {
+ chain
+ hypWrite(bool v = true) const
+ {
hypE2HWrite(v);
hypSecureWrite(v);
hypNonSecureWrite(v);
return *this;
}
- chain hypSecure(bool v = true) const {
+ chain
+ hypSecure(bool v = true) const
+ {
hypE2HSecureRead(v);
hypE2HSecureWrite(v);
hypSecureRead(v);
hypSecureWrite(v);
return *this;
}
- chain hyp(bool v = true) const {
+ chain
+ hyp(bool v = true) const
+ {
hypRead(v);
hypWrite(v);
return *this;
}
- chain monE2HRead(bool v = true) const {
+ chain
+ monE2HRead(bool v = true) const
+ {
info[MISCREG_MON_E2H_RD] = v;
return *this;
}
- chain monE2HWrite(bool v = true) const {
+ chain
+ monE2HWrite(bool v = true) const
+ {
info[MISCREG_MON_E2H_WR] = v;
return *this;
}
- chain monE2H(bool v = true) const {
+ chain
+ monE2H(bool v = true) const
+ {
monE2HRead(v);
monE2HWrite(v);
return *this;
}
- chain monSecureRead(bool v = true) const {
+ chain
+ monSecureRead(bool v = true) const
+ {
monE2HRead(v);
info[MISCREG_MON_NS0_RD] = v;
return *this;
}
- chain monSecureWrite(bool v = true) const {
+ chain
+ monSecureWrite(bool v = true) const
+ {
monE2HWrite(v);
info[MISCREG_MON_NS0_WR] = v;
return *this;
}
- chain monNonSecureRead(bool v = true) const {
+ chain
+ monNonSecureRead(bool v = true) const
+ {
monE2HRead(v);
info[MISCREG_MON_NS1_RD] = v;
return *this;
}
- chain monNonSecureWrite(bool v = true) const {
+ chain
+ monNonSecureWrite(bool v = true) const
+ {
monE2HWrite(v);
info[MISCREG_MON_NS1_WR] = v;
return *this;
}
- chain mon(bool v = true) const {
+ chain
+ mon(bool v = true) const
+ {
monSecureRead(v);
monSecureWrite(v);
monNonSecureRead(v);
monNonSecureWrite(v);
return *this;
}
- chain monSecure(bool v = true) const {
+ chain
+ monSecure(bool v = true) const
+ {
monSecureRead(v);
monSecureWrite(v);
return *this;
}
- chain monNonSecure(bool v = true) const {
+ chain
+ monNonSecure(bool v = true) const
+ {
monNonSecureRead(v);
monNonSecureWrite(v);
return *this;
}
- chain allPrivileges(bool v = true) const {
+ chain
+ allPrivileges(bool v = true) const
+ {
userNonSecureRead(v);
userNonSecureWrite(v);
userSecureRead(v);
@@ -388,7 +492,9 @@
monNonSecureWrite(v);
return *this;
}
- chain nonSecure(bool v = true) const {
+ chain
+ nonSecure(bool v = true) const
+ {
userNonSecureRead(v);
userNonSecureWrite(v);
privNonSecureRead(v);
@@ -399,7 +505,9 @@
monNonSecureWrite(v);
return *this;
}
- chain secure(bool v = true) const {
+ chain
+ secure(bool v = true) const
+ {
userSecureRead(v);
userSecureWrite(v);
privSecureRead(v);
@@ -408,7 +516,9 @@
monSecureWrite(v);
return *this;
}
- chain reads(bool v) const {
+ chain
+ reads(bool v) const
+ {
userNonSecureRead(v);
userSecureRead(v);
privNonSecureRead(v);
@@ -418,7 +528,9 @@
monNonSecureRead(v);
return *this;
}
- chain writes(bool v) const {
+ chain
+ writes(bool v) const
+ {
userNonSecureWrite(v);
userSecureWrite(v);
privNonSecureWrite(v);
@@ -428,7 +540,9 @@
monNonSecureWrite(v);
return *this;
}
- chain exceptUserMode() const {
+ chain
+ exceptUserMode() const
+ {
user(0);
return *this;
}
@@ -443,7 +557,9 @@
}
};
- const MiscRegLUTEntryInitializer InitReg(uint32_t reg) {
+ const MiscRegLUTEntryInitializer
+ InitReg(uint32_t reg)
+ {
return MiscRegLUTEntryInitializer(lookUpMiscReg[reg],
miscRegInfo[reg]);
}
@@ -825,7 +941,8 @@
return reg_as_int;
}
- std::pair<int,int> getMiscIndices(int misc_reg) const
+ std::pair<int,int>
+ getMiscIndices(int misc_reg) const
{
// Note: indexes of AArch64 registers are left unchanged
int flat_idx = flattenMiscIndex(misc_reg);
@@ -881,7 +998,8 @@
enums::DecoderFlavor decoderFlavor() const { return
_decoderFlavor; }
/** Returns true if the ISA has a GICv3 cpu interface */
- bool haveGICv3CpuIfc() const
+ bool
+ haveGICv3CpuIfc() const
{
// gicv3CpuInterface is initialized at startup time, hence
// trying to read its value before the startup stage will lead
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53267
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib827e4ae9662e79512a18c13e1cd262213406fbf
Gerrit-Change-Number: 53267
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Richard Cooper <richard.coo...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s