Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/49700 )

Change subject: cpu: Remove readVecPredReg from ThreadContext::compare.
......................................................................

cpu: Remove readVecPredReg from ThreadContext::compare.

Use the generic getReg method to avoid having to use the
TheISA::VecPredRegContainer type.

Change-Id: I8240dd85f2db2f8125d7944135c4361866fba057
---
M src/cpu/thread_context.cc
1 file changed, 14 insertions(+), 6 deletions(-)



diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index aeeea77..c8fffea 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -41,6 +41,8 @@

 #include "cpu/thread_context.hh"

+#include <vector>
+
 #include "arch/generic/vec_pred_reg.hh"
 #include "base/logging.hh"
 #include "base/trace.hh"
@@ -91,13 +93,19 @@
     }

     // Then loop through the predicate registers.
-    for (int i = 0; i < regClasses.at(VecPredRegClass).size(); ++i) {
+    const auto &vec_pred_class = regClasses.at(VecPredRegClass);
+    std::vector<uint8_t> pred1(vec_pred_class.regBytes());
+    std::vector<uint8_t> pred2(vec_pred_class.regBytes());
+    for (int i = 0; i < vec_pred_class.size(); ++i) {
         RegId rid(VecPredRegClass, i);
-        const TheISA::VecPredRegContainer& t1 = one->readVecPredReg(rid);
-        const TheISA::VecPredRegContainer& t2 = two->readVecPredReg(rid);
-        if (t1 != t2)
-            panic("Pred reg idx %d doesn't match, one: %#x, two: %#x",
-                  i, t1, t2);
+
+        one->getReg(rid, pred1.data());
+        two->getReg(rid, pred2.data());
+        if (pred1 != pred2) {
+            panic("Pred reg idx %d doesn't match, one: %s, two: %s",
+                  i, vec_pred_class.valString(pred1.data()),
+                  vec_pred_class.valString(pred2.data()));
+        }
     }

     for (int i = 0; i < regClasses.at(MiscRegClass).size(); ++i) {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49700
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: I8240dd85f2db2f8125d7944135c4361866fba057
Gerrit-Change-Number: 49700
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
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