From 0d233dbc5d08d7f6c98a68a1d4f0cb94157c97a1 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 22 Sep 2020 11:42:49 -0700 Subject: [PATCH] Revert "disable pia in div tests" Bug #497 resolved as invalid This reverts commit 05b9baec72be4ef56de2ed56ec12cbf5f7f0eefe. --- src/soc/fu/div/test/helper.py | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/soc/fu/div/test/helper.py b/src/soc/fu/div/test/helper.py index eb49b653..d9c8a718 100644 --- a/src/soc/fu/div/test/helper.py +++ b/src/soc/fu/div/test/helper.py @@ -76,20 +76,12 @@ def set_alu_inputs(alu, dec2, sim): yield from ALUHelpers.set_xer_so(alu, dec2, inp) overflow = None - 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) + 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) class DivTestHelper(unittest.TestCase): @@ -135,12 +127,10 @@ class DivTestHelper(unittest.TestCase): opname = code.split(' ')[0] fnname = opname.replace(".", "_") - pia_res = None - if pia_inputs: - print(f"{fnname}({pia_inputs})") - pia_res = getattr( - pia, opname.replace(".", "_"))(pia_inputs) - print(f"-> {pia_res}") + 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 -- 2.30.2