Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/52027 )
Change subject: cpu: Fix style in the RAS.
......................................................................
cpu: Fix style in the RAS.
Change-Id: Ifda384fe06ac81802f8ad3353a73b7eec8da3d98
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52027
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/pred/ras.cc
M src/cpu/pred/ras.hh
2 files changed, 31 insertions(+), 13 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/cpu/pred/ras.cc b/src/cpu/pred/ras.cc
index 6a81446..d2235e9 100644
--- a/src/cpu/pred/ras.cc
+++ b/src/cpu/pred/ras.cc
@@ -37,9 +37,9 @@
void
ReturnAddrStack::init(unsigned _numEntries)
{
- numEntries = _numEntries;
- addrStack.resize(numEntries);
- reset();
+ numEntries = _numEntries;
+ addrStack.resize(numEntries);
+ reset();
}
void
diff --git a/src/cpu/pred/ras.hh b/src/cpu/pred/ras.hh
index 6edcc0e..40c6dac 100644
--- a/src/cpu/pred/ras.hh
+++ b/src/cpu/pred/ras.hh
@@ -58,12 +58,10 @@
void reset();
/** Returns the top address on the RAS. */
- TheISA::PCState top()
- { return addrStack[tos]; }
+ TheISA::PCState top() { return addrStack[tos]; }
/** Returns the index of the top of the RAS. */
- unsigned topIdx()
- { return tos; }
+ unsigned topIdx() { return tos; }
/** Pushes an address onto the RAS. */
void push(const TheISA::PCState &return_addr);
@@ -78,17 +76,24 @@
*/
void restore(unsigned top_entry_idx, const TheISA::PCState &restored);
- bool empty() { return usedEntries == 0; }
+ bool empty() { return usedEntries == 0; }
- bool full() { return usedEntries == numEntries; }
+ bool full() { return usedEntries == numEntries; }
private:
/** Increments the top of stack index. */
- inline void incrTos()
- { if (++tos == numEntries) tos = 0; }
+ inline void
+ incrTos()
+ {
+ if (++tos == numEntries)
+ tos = 0;
+ }
/** Decrements the top of stack index. */
- inline void decrTos()
- { tos = (tos == 0 ? numEntries - 1 : tos - 1); }
+ inline void
+ decrTos()
+ {
+ tos = (tos == 0 ? numEntries - 1 : tos - 1);
+ }
/** The RAS itself. */
std::vector<TheISA::PCState> addrStack;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52027
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: Ifda384fe06ac81802f8ad3353a73b7eec8da3d98
Gerrit-Change-Number: 52027
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s