add heading option to GPR dump
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 10 Jan 2024 16:27:35 +0000 (16:27 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 30 Jan 2024 20:56:36 +0000 (20:56 +0000)
src/openpower/decoder/isa/caller.py

index 8fcd567d5068c25fb9d914328b6976941a1712b3..35376505ef4acee276bc28a66d6a3985fdb5566f 100644 (file)
@@ -248,7 +248,7 @@ class GPR(dict):
         log("GPR getitem", attr, rnum)
         return self.regfile[rnum]
 
-    def dump(self, printout=True):
+    def dump(self, printout=True, heading="log"):
         res = []
         for i in range(len(self)):
             res.append(self[i].value)
@@ -258,7 +258,7 @@ class GPR(dict):
                 for j in range(8):
                     s.append("%08x" % res[i+j])
                 s = ' '.join(s)
-                log("reg", "%2d" % i, s, kind=LogType.InstrInOuts)
+                log(heading, "%2d" % i, s, kind=LogType.InstrInOuts)
         return res