From b59a8ec56a89e1f148ab41499442d5c51aee6786 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 17:42:05 +0100 Subject: [PATCH] simplify instr_is_priv --- src/soc/decoder/power_decoder2.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 9f46e3f0..5abf8314 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -36,11 +36,9 @@ def instr_is_priv(m, op, insn): comb = m.d.comb is_priv_insn = Signal(reset_less=True) with m.Switch(op): - with m.Case(MicrOp.OP_ATTN) : comb += is_priv_insn.eq(1) - with m.Case(MicrOp.OP_MFMSR) : comb += is_priv_insn.eq(1) - with m.Case(MicrOp.OP_MTMSRD): comb += is_priv_insn.eq(1) - with m.Case(MicrOp.OP_MTMSR): comb += is_priv_insn.eq(1) - with m.Case(MicrOp.OP_RFID) : comb += is_priv_insn.eq(1) + with m.Case(MicrOp.OP_ATTN, MicrOp.OP_MFMSR, MicrOp.OP_MTMSRD, + MicrOp.OP_MTMSR, MicrOp.OP_RFID): + comb += is_priv_insn.eq(1) # XXX TODO #with m.Case(MicrOp.OP_TLBIE) : comb += is_priv_insn.eq(1) with m.Case(MicrOp.OP_MFSPR, MicrOp.OP_MTSPR): -- 2.30.2