add ctr_ok and cond_ok to namespace to be able
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 12 Aug 2021 14:20:20 +0000 (15:20 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 12 Aug 2021 14:20:20 +0000 (15:20 +0100)
to detect if the branch took place or not

src/openpower/decoder/isa/caller.py

index c0ef32f988dd7f9a5d05e8fde845bc7c35f78341..7d8497daad430e2fff7765f0c6cc0ac6bb73bab4 100644 (file)
@@ -770,6 +770,9 @@ class ISACaller:
             self.namespace['VLI'] = SelectableInt(bc_vli, 1)
             self.namespace['sz'] = SelectableInt(sz, 1)
             self.namespace['SNZ'] = SelectableInt(bc_snz, 1)
+            # use these to detect if the branch took place
+            self.namespace['ctr_ok'] = SelectableInt(0, 1)
+            self.namespace['cond_ok'] = SelectableInt(0, 1)
 
     def handle_carry_(self, inputs, outputs, already_done):
         inv_a = yield self.dec2.e.do.invert_in