From: Dmitry Selyutin Date: Sun, 18 Sep 2022 08:52:13 +0000 (+0300) Subject: power_insn: decouple branch modes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba93a546841b3998a1923d5a6ac4580443d48840;p=openpower-isa.git power_insn: decouple branch modes --- 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):