From f5549bf43d740610a5980b5930241ff37641bdd6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 1 Mar 2021 19:35:31 +0000 Subject: [PATCH] Revert "fix Bug 607 - unnecessary code added related to MMU in PowerDecoder2" This reverts commit 0b31706069567c4124ebac487f238342cc540d79. --- src/soc/decoder/power_decoder2.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 0a204904..6b353081 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -771,8 +771,16 @@ class PowerDecodeSubset(Elaboratable): # set up instruction type # no op: defaults to OP_ILLEGAL - # FIX https://bugs.libre-soc.org/show_bug.cgi?id=607 - comb += self.do_copy("insn_type", self.op_get("internal_op")) + if self.fn_name=="MMU": + # mmu is special case: needs SPR opcode as well + mmu0 = self.mmu0_spr_dec + with m.If(((mmu0.dec.op.internal_op == MicrOp.OP_MTSPR) | + (mmu0.dec.op.internal_op == MicrOp.OP_MFSPR))): + comb += self.do_copy("insn_type", mmu0.op_get("internal_op")) + with m.Else(): + comb += self.do_copy("insn_type", self.op_get("internal_op")) + else: + comb += self.do_copy("insn_type", self.op_get("internal_op")) # function unit for decoded instruction: requires minor redirect # for SPR set/get -- 2.30.2