Get working mcrf in caller.py
authorMichael Nolan <mtnolan2640@gmail.com>
Sat, 16 May 2020 13:37:39 +0000 (09:37 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Sat, 16 May 2020 13:37:39 +0000 (09:37 -0400)
src/soc/decoder/isa/caller.py
src/soc/decoder/isa/condition.patch [new file with mode: 0644]

index e7f26a637bb4735b80414c28d8a744d7a84eb67e..35ea2197576fd3c7b68ff2eaed1b0b5f131c1b31 100644 (file)
@@ -231,7 +231,7 @@ class ISACaller:
             else:
                 sig = getattr(fields, name)
             val = yield sig
-            if name == 'BF':
+            if name in ['BF', 'BFA']:
                 self.namespace[name] = val
             else:
                 self.namespace[name] = SelectableInt(val, sig.width)
diff --git a/src/soc/decoder/isa/condition.patch b/src/soc/decoder/isa/condition.patch
new file mode 100644 (file)
index 0000000..a5e38d8
--- /dev/null
@@ -0,0 +1,11 @@
+--- condition.py.orig  2020-05-16 09:37:19.676855312 -0400
++++ condition.py       2020-05-16 09:37:24.643575782 -0400
+@@ -51,7 +51,7 @@
+     @inject()
+     def op_mcrf(self, CR):
+-        CR[4 * BF + 32:4 * BF + 35 + 1] = CR[4 * BFA + 32:4 * BFA + 35 + 1]
++        CR.si[4 * BF + 32:4 * BF + 35 + 1] = CR.si[4 * BFA + 32:4 * BFA + 35 + 1]
+         return (CR,)
+     condition_instrs = {}