overflow-enable does not occur on shift operations
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Aug 2020 14:20:31 +0000 (15:20 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Aug 2020 14:20:31 +0000 (15:20 +0100)
src/soc/decoder/power_decoder2.py
src/soc/simple/test/test_issuer.py

index 51c3511f9dc93cde787029b4903e1358f57594da..046b715b19df68803c1c289cc2812b4c37ed31bf 100644 (file)
@@ -450,7 +450,11 @@ class DecodeOE(Elaboratable):
         with m.Switch(op.internal_op):
 
             # mulhw, mulhwu, mulhd, mulhdu - these *ignore* OE
-            with m.Case(MicrOp.OP_MUL_H64, MicrOp.OP_MUL_H32):
+            # also rotate
+            with m.Case(MicrOp.OP_MUL_H64, MicrOp.OP_MUL_H32,
+                        MicrOp.OP_SHL, MicrOp.OP_SHR, MicrOp.OP_RLC,
+                        MicrOp.OP_RLCL, MicrOp.OP_RLCR,
+                        MicrOp.OP_EXTSWSLI):
                 pass
 
             # all other ops decode OE field
index f83c17b58db73c971acab9357c68933bb07dadbc..2361ed1a30ce3cfdddfb154c05c80f437fb5a56b 100644 (file)
@@ -32,7 +32,7 @@ from soc.debug.dmi import DBGCore, DBGCtrl, DBGStat
 from soc.fu.alu.test.test_pipe_caller import ALUTestCase
 from soc.fu.div.test.test_pipe_caller import DivTestCases
 from soc.fu.logical.test.test_pipe_caller import LogicalTestCase
-#from soc.fu.shift_rot.test.test_pipe_caller import ShiftRotTestCase
+from soc.fu.shift_rot.test.test_pipe_caller import ShiftRotTestCase
 from soc.fu.cr.test.test_pipe_caller import CRTestCase
 #from soc.fu.branch.test.test_pipe_caller import BranchTestCase
 #from soc.fu.spr.test.test_pipe_caller import SPRTestCase
@@ -304,7 +304,7 @@ if __name__ == "__main__":
     suite.addTest(TestRunner(GeneralTestCases.test_data))
     suite.addTest(TestRunner(LDSTTestCase().test_data))
     suite.addTest(TestRunner(CRTestCase().test_data))
-    # suite.addTest(TestRunner(ShiftRotTestCase.test_data))
+    suite.addTest(TestRunner(ShiftRotTestCase().test_data))
     suite.addTest(TestRunner(LogicalTestCase().test_data))
     suite.addTest(TestRunner(ALUTestCase().test_data))
     # suite.addTest(TestRunner(BranchTestCase.test_data))