From 8efa8f320d18c643f5dce9afa70fd56a1ea0c4d4 Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Sat, 16 May 2020 09:37:39 -0400 Subject: [PATCH] Get working mcrf in caller.py --- src/soc/decoder/isa/caller.py | 2 +- src/soc/decoder/isa/condition.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/soc/decoder/isa/condition.patch diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index e7f26a63..35ea2197 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -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 index 00000000..a5e38d89 --- /dev/null +++ b/src/soc/decoder/isa/condition.patch @@ -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 = {} -- 2.30.2