From: Luke Kenneth Casson Leighton Date: Fri, 21 May 2021 13:57:11 +0000 (+0100) Subject: return register values from GPR.dump in ISACaller X-Git-Tag: xlen-bcd~576 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84389156a342f95ccb53e488b590c5de1566381e;p=openpower-isa.git return register values from GPR.dump in ISACaller --- diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 05bb3fb6..5eef119c 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -124,13 +124,18 @@ class GPR(dict): print("GPR getitem", attr, rnum, "srcoffs", offs) return self.regfile[rnum] - def dump(self): - for i in range(0, len(self), 8): - s = [] - for j in range(8): - s.append("%08x" % self[i+j].value) - s = ' '.join(s) - print("reg", "%2d" % i, s) + def dump(self, printout=True): + res = [] + for i in range(len(self)): + res.append(self[i].value) + if printout: + for i in range(0, len(res), 8): + s = [] + for j in range(8): + s.append("%08x" % res[i+j]) + s = ' '.join(s) + print("reg", "%2d" % i, s) + return res class SPR(dict):