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

Change subject: cpu: Use the built in << for VecReg and VecPredReg in ExeTrace.
......................................................................

cpu: Use the built in << for VecReg and VecPredReg in ExeTrace.

There's no reason to reimplement printing code when VecReg and
VecPredReg types already know how to print themselves.

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

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



diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc
index be86161..f209bd4 100644
--- a/src/cpu/exetrace.cc
+++ b/src/cpu/exetrace.cc
@@ -115,31 +115,10 @@
         if (Debug::ExecResult && data_status != DataInvalid) {
             switch (data_status) {
               case DataVec:
-                {
-                    ccprintf(outs, " D=0x[");
-                    auto dv = data.as_vec->as<uint32_t>();
-                    for (int i = TheISA::VecRegSizeBytes / 4 - 1; i >= 0;
-                         i--) {
-                        ccprintf(outs, "%08x", dv[i]);
-                        if (i != 0) {
-                            ccprintf(outs, "_");
-                        }
-                    }
-                    ccprintf(outs, "]");
-                }
+                ccprintf(outs, " D=%s", *data.as_vec);
                 break;
               case DataVecPred:
-                {
-                    ccprintf(outs, " D=0b[");
-                    auto pv = data.as_pred->as<uint8_t>();
- for (int i = TheISA::VecPredRegSizeBits - 1; i >= 0; i--) {
-                        ccprintf(outs, pv[i] ? "1" : "0");
-                        if (i != 0 && i % 4 == 0) {
-                            ccprintf(outs, "_");
-                        }
-                    }
-                    ccprintf(outs, "]");
-                }
+                ccprintf(outs, " D=%s", *data.as_pred);
                 break;
               default:
                 ccprintf(outs, " D=%#018x", data.as_int);



8 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/42001
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: I092c28143de286d765312122b81ce865a5184091
Gerrit-Change-Number: 42001
Gerrit-PatchSet: 10
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.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