begin function split in ISACaller
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 18 Jul 2022 20:05:27 +0000 (21:05 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 18 Jul 2022 20:05:27 +0000 (21:05 +0100)
https://bugs.libre-soc.org/show_bug.cgi?id=728

src/openpower/decoder/isa/caller.py

index c325fe1eb39748e831884c25b061017ed5dea1c8..a509c2d74ae93ad5b0670371547f67d88b25ddf7 100644 (file)
@@ -1607,6 +1607,12 @@ class ISACaller(ISACallerHelper, ISAFPHelpers):
                     else:
                         self.gpr[regnum] = output
 
+        nia_update = (yield from self.check_step_increment(results, rc_en,
+                                                           asmop, ins_name))
+        if nia_update:
+            self.update_pc_next()
+
+    def check_step_increment(self, results, rc_en, asmop, ins_name):
         # check if it is the SVSTATE.src/dest step that needs incrementing
         # this is our Sub-Program-Counter loop from 0 to VL-1
         pre = False
@@ -1677,8 +1683,7 @@ class ISACaller(ISACallerHelper, ISAFPHelpers):
             # to interrupt in between. sigh.
             self.last_op_svshape = asmop in ['svremap', 'svindex']
 
-        if nia_update:
-            self.update_pc_next()
+        return nia_update
 
     def SVSTATE_NEXT(self, mode, submode):
         """explicitly moves srcstep/dststep on to next element, for