set regfile in ISACaller equal to length of initial variables
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Jun 2021 18:53:50 +0000 (19:53 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Jun 2021 18:53:50 +0000 (19:53 +0100)
src/openpower/decoder/isa/caller.py

index 9ab9a67fa7c9313679a8900fc6d653cc017291ad..e3ecbed672eb128d64567b5f9b6e207b2871f6fa 100644 (file)
@@ -98,7 +98,7 @@ class GPR(dict):
         self.sd = decoder
         self.isacaller = isacaller
         self.svstate = svstate
-        for i in range(32):
+        for i in range(len(regfile)):
             self[i] = SelectableInt(regfile[i], 64)
 
     def __call__(self, ridx):
@@ -123,12 +123,7 @@ class GPR(dict):
         """ XXX currently not used
         """
         rnum = self._get_regnum(attr)
-        # XXX TODO, this needs sorting! (1) reverse gear for mapreduce
-        # and (2) when doing element-width overrides.  used by
-        # GPR(x) or GPR[x] in pseudocode
-        offs = self.svstate.srcstep
-        log("GPR getitem TODO mapreduce reverse-gear", attr, rnum,
-             "srcoffs", offs)
+        log("GPR getitem", attr, rnum)
         return self.regfile[rnum]
 
     def dump(self, printout=True):