whoops, overflow-decode (handle_overflow) needed to check e.oe.ok
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 8 Jun 2020 17:51:23 +0000 (18:51 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 8 Jun 2020 17:52:50 +0000 (18:52 +0100)
*and* e.oe.oe to decide whether to set SO/OV/OV32

src/soc/decoder/isa/caller.py

index 6e6494d35ba4a8b318551b3eba0b3e31b023101a..6541a56c5d769a08f2b3f619cac9b90a05b356da 100644 (file)
@@ -380,8 +380,9 @@ class ISACaller:
         carry_en = yield self.dec2.e.output_carry
         if carry_en:
             yield from self.handle_carry_(inputs, results, already_done)
-        ov_en = yield self.dec2.e.oe
-        if ov_en:
+        ov_en = yield self.dec2.e.oe.oe
+        ov_ok = yield self.dec2.e.oe.ok
+        if ov_en & ov_ok:
             yield from self.handle_overflow(inputs, results)
         rc_en = yield self.dec2.e.rc.data
         if rc_en: