From b8d4731c4516090a7ccce4b65eaf18bd784f07b1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 25 Jul 2020 16:18:16 +0100 Subject: [PATCH] add regression test 8, DivPipeCore producing spurious result --- src/soc/fu/div/test/test_pipe_caller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/fu/div/test/test_pipe_caller.py b/src/soc/fu/div/test/test_pipe_caller.py index 9bb54e23..919c1859 100644 --- a/src/soc/fu/div/test/test_pipe_caller.py +++ b/src/soc/fu/div/test/test_pipe_caller.py @@ -103,6 +103,14 @@ class DivTestCases(unittest.TestCase): with Program(lst, bigendian) as prog: self.run_test_program(prog, initial_regs) + def test_8_regression(self): + lst = ["divwu. 3, 1, 2"] + initial_regs = [0] * 32 + initial_regs[1] = 18 + initial_regs[2] = 3 + with Program(lst, bigendian) as prog: + self.run_test_program(prog, initial_regs) + def test_divw_by_zero_1(self): lst = ["divw. 3, 1, 2"] initial_regs = [0] * 32 -- 2.30.2