brackets to be safe
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Mar 2020 16:54:54 +0000 (16:54 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 26 Mar 2020 16:54:54 +0000 (16:54 +0000)
src/soc/simulator/internalop_sim.py

index b9724be9aa6d3519197e5c7b767e286aa8907937..c794e591fbdf5f0760bf210a30b7061293eba536 100644 (file)
@@ -125,7 +125,7 @@ class InternalOpSimulator:
 
         inv_a = yield pdecode2.dec.op.inv_a
         if inv_a:
-            operand1 = ~operand1 & ((1<<64)-1)
+            operand1 = (~operand1) & ((1<<64)-1)
 
         cry_in = yield pdecode2.dec.op.cry_in
         if cry_in == CryIn.ONE.value: