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

 (

50 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: cpu: Remove VecRegContainer from ThreadContext::compare.
......................................................................

cpu: Remove VecRegContainer from ThreadContext::compare.

Change-Id: I5a0f9d30fe56806d46fb54d62e1e58d02a319879
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49708
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/cpu/thread_context.cc
1 file changed, 24 insertions(+), 5 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index 2c2e248..400bc16 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -83,13 +83,19 @@
     }

     // Then loop through the vector registers.
-    for (int i = 0; i < regClasses.at(VecRegClass).numRegs(); ++i) {
+    const auto &vec_class = regClasses.at(VecRegClass);
+    std::vector<uint8_t> vec1(vec_class.regBytes());
+    std::vector<uint8_t> vec2(vec_class.regBytes());
+    for (int i = 0; i < vec_class.numRegs(); ++i) {
         RegId rid(VecRegClass, i);
-        const TheISA::VecRegContainer& t1 = one->readVecReg(rid);
-        const TheISA::VecRegContainer& t2 = two->readVecReg(rid);
-        if (t1 != t2)
+
+        one->getReg(rid, vec1.data());
+        two->getReg(rid, vec2.data());
+        if (vec1 != vec2) {
             panic("Vec reg idx %d doesn't match, one: %#x, two: %#x",
-                  i, t1, t2);
+                  i, vec_class.valString(vec1.data()),
+                  vec_class.valString(vec2.data()));
+        }
     }

     // Then loop through the predicate registers.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49708
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: I5a0f9d30fe56806d46fb54d62e1e58d02a319879
Gerrit-Change-Number: 49708
Gerrit-PatchSet: 54
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.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

Reply via email to