From ba93a546841b3998a1923d5a6ac4580443d48840 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 18 Sep 2022 11:52:13 +0300 Subject: [PATCH] power_insn: decouple branch modes --- src/openpower/decoder/power_insn.py | 37 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 02028a36..4e900b15 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1705,23 +1705,32 @@ class BranchBaseRM(BaseRM): sz: BaseRM[23] -class BranchRM(BranchBaseRM): - class simple(BranchBaseRM): - """branch: simple mode""" - pass +class BranchSimpleRM(BranchBaseRM): + """branch: simple mode""" + pass - class vls(BranchBaseRM): - """branch: VLSET mode""" - VSb: BaseRM[7] - VLI: BaseRM[21] - class ctr(BranchBaseRM): - """branch: CTR-test mode""" - CTi: BaseRM[6] +class BranchVLSRM(BranchBaseRM): + """branch: VLSET mode""" + VSb: BaseRM[7] + VLI: BaseRM[21] - class ctrvls(vls, ctr): - """branch: CTR-test+VLSET mode""" - pass + +class BranchCTRRM(BranchBaseRM): + """branch: CTR-test mode""" + CTi: BaseRM[6] + + +class BranchCTRVLSRM(BranchVLSRM, BranchCTRRM): + """branch: CTR-test+VLSET mode""" + pass + + +class BranchRM(BranchBaseRM): + simple: BranchSimpleRM + vls: BranchVLSRM + ctr: BranchCTRRM + ctrvls: BranchCTRVLSRM class RM(BaseRM): -- 2.30.2