Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/49123 )

Change subject: cpu: Fix style in inst_res.hh.
......................................................................

cpu: Fix style in inst_res.hh.

Change-Id: Ifc6d980f5dc0cec8b6ac58e4fb390ed49e3e1a39
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49123
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/inst_res.hh
1 file changed, 34 insertions(+), 20 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/cpu/inst_res.hh b/src/cpu/inst_res.hh
index 68e189a..e1151eb 100644
--- a/src/cpu/inst_res.hh
+++ b/src/cpu/inst_res.hh
@@ -78,7 +78,8 @@
     InstResult(const InstResult &) = default;
     /** Scalar result from scalar. */
     template<typename T>
-    explicit InstResult(T i, const ResultType& t) : type(t) {
+    explicit InstResult(T i, const ResultType& t) : type(t)
+    {
         static_assert(std::is_integral_v<T> ^ std::is_floating_point_v<T>,
"Parameter type is neither integral nor fp, or it is both");
         if (std::is_integral_v<T>) {
@@ -89,62 +90,75 @@
     }
     /** Vector result. */
explicit InstResult(const TheISA::VecRegContainer& v, const ResultType& t)
-        : type(t) { result.vector = v; }
+        : type(t)
+    {
+        result.vector = v;
+    }
     /** Predicate result. */
     explicit InstResult(const TheISA::VecPredRegContainer& v,
             const ResultType& t)
-        : type(t) { result.pred = v; }
+        : type(t)
+    {
+        result.pred = v;
+    }

-    InstResult& operator=(const InstResult& that) {
+    InstResult&
+    operator=(const InstResult& that)
+    {
         type = that.type;
         switch (type) {
- /* Given that misc regs are not written to, there may be invalids in
-         * the result stack. */
-        case ResultType::Invalid:
+ // Given that misc regs are not written to, there may be invalids in
+          //the result stack.
+          case ResultType::Invalid:
             break;
-        case ResultType::Scalar:
+          case ResultType::Scalar:
             result.integer = that.result.integer;
             break;
-        case ResultType::VecElem:
+          case ResultType::VecElem:
             result.vecElem = that.result.vecElem;
             break;
-        case ResultType::VecReg:
+          case ResultType::VecReg:
             result.vector = that.result.vector;
             break;
-        case ResultType::VecPredReg:
+          case ResultType::VecPredReg:
             result.pred = that.result.pred;
             break;

-        default:
+          default:
             panic("Assigning result from unknown result type");
             break;
         }
         return *this;
     }
+
     /**
      * Result comparison
      * Two invalid results always differ.
      */
-    bool operator==(const InstResult& that) const {
+    bool
+    operator==(const InstResult& that) const
+    {
         if (this->type != that.type)
             return false;
         switch (type) {
-        case ResultType::Scalar:
+          case ResultType::Scalar:
             return result.integer == that.result.integer;
-        case ResultType::VecElem:
+          case ResultType::VecElem:
             return result.vecElem == that.result.vecElem;
-        case ResultType::VecReg:
+          case ResultType::VecReg:
             return result.vector == that.result.vector;
-        case ResultType::VecPredReg:
+          case ResultType::VecPredReg:
             return result.pred == that.result.pred;
-        case ResultType::Invalid:
+          case ResultType::Invalid:
             return false;
-        default:
+          default:
             panic("Unknown type of result: %d\n", (int)type);
         }
     }

-    bool operator!=(const InstResult& that) const {
+    bool
+    operator!=(const InstResult& that) const
+    {
         return !operator==(that);
     }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49123
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: Ifc6d980f5dc0cec8b6ac58e4fb390ed49e3e1a39
Gerrit-Change-Number: 49123
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[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

Reply via email to