add regression test for nonzero addis
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Aug 2020 11:24:29 +0000 (12:24 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Aug 2020 11:24:29 +0000 (12:24 +0100)
src/soc/fu/alu/test/test_pipe_caller.py

index c8d23a350269ba237c587ad44e61d02984613992..4e55dadcaa61ae42eb1ee79661bc0eb150cc8681 100644 (file)
@@ -99,6 +99,13 @@ class ALUTestCase(TestAccumulatorBase):
             initial_regs[2] = random.randint(0, (1 << 64)-1)
             self.add_case(Program(lst, bigendian), initial_regs)
 
+    def case_addis_nonzero_r0_regression(self):
+        lst = [f"addis 3, 0, 1"]
+        print(lst)
+        initial_regs = [0] * 32
+        initial_regs[0] = 5
+        self.add_case(Program(lst, bigendian), initial_regs)
+
     def case_addis_nonzero_r0(self):
         for i in range(10):
             imm = random.randint(-(1 << 15), (1 << 15)-1)