disable pia in div tests
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 22 Sep 2020 09:18:51 +0000 (10:18 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 22 Sep 2020 09:18:51 +0000 (10:18 +0100)
https://bugs.libre-soc.org/show_bug.cgi?id=497

src/soc/fu/div/test/helper.py

index d9c8a718721569d80890d91b28b387bd43d2d052..eb49b653a4b08aa85cdb6f5494854e0e9a8baf21 100644 (file)
@@ -76,12 +76,20 @@ def set_alu_inputs(alu, dec2, sim):
     yield from ALUHelpers.set_xer_so(alu, dec2, inp)
 
     overflow = None
-    if 'xer_so' in inp:
-        so = inp['xer_so']
-        overflow = pia.OverflowFlags(so=bool(so),
-                                     ov=False,
-                                     ov32=False)
-    return pia.InstructionInput(ra=inp["ra"], rb=inp["rb"], overflow=overflow)
+    if 'xer_so' not in inp:
+        return
+    so = inp['xer_so']
+
+    # XXX doesn't work because it's not being properly kept up-to-date
+    # and we're 2 days before a code-freeze.
+    # https://bugs.libre-soc.org/show_bug.cgi?id=497
+    return None
+
+    overflow = pia.OverflowFlags(so=bool(so),
+                                 ov=False,
+                                 ov32=False)
+    return pia.InstructionInput(ra=inp["ra"], rb=inp["rb"], rc=0,
+                                overflow=overflow)
 
 
 class DivTestHelper(unittest.TestCase):
@@ -127,10 +135,12 @@ class DivTestHelper(unittest.TestCase):
 
             opname = code.split(' ')[0]
             fnname = opname.replace(".", "_")
-            print(f"{fnname}({pia_inputs})")
-            pia_res = getattr(
-                pia, opname.replace(".", "_"))(pia_inputs)
-            print(f"-> {pia_res}")
+            pia_res = None
+            if pia_inputs:
+                print(f"{fnname}({pia_inputs})")
+                pia_res = getattr(
+                    pia, opname.replace(".", "_"))(pia_inputs)
+                print(f"-> {pia_res}")
 
             yield from isa_sim.call(opname)
             index = isa_sim.pc.CIA.value//4