From: Dmitry Selyutin Date: Tue, 20 Sep 2022 10:23:44 +0000 (+0300) Subject: power_insn: custom sz handling for branches X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=161cdc781f31462edd9f0c42ac5e6c4b1b5d04be;p=openpower-isa.git power_insn: custom sz handling for branches --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 98fd44c9..600d8fd4 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1723,7 +1723,7 @@ class CROpRM(CROpBaseRM): # ******************** # Branches mode # https://libre-soc.org/openpower/sv/branches/ -class BranchBaseRM(SZBaseRM, BaseRM): +class BranchBaseRM(BaseRM): ALL: BaseRM[4] SNZ: BaseRM[5] SL: BaseRM[17] @@ -1736,8 +1736,20 @@ class BranchBaseRM(SZBaseRM, BaseRM): def specifiers(self, record): if self.ALL: yield "all" + + # /sz + # branch.sz=1 + # branch.snz=0 + # /snz + # branch.sz=1 + # branch.snz=1 if self.SNZ: + if not self.sz: + raise ValueError(self.sz) yield "snz" + elif self.sz: + yield "sz" + if self.SL: yield "sl" if self.SLu: