projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a515a37
)
power_insn: custom sz handling for branches
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 20 Sep 2022 10:23:44 +0000
(13:23 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 20 Sep 2022 10:26:45 +0000
(13:26 +0300)
src/openpower/decoder/power_insn.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/power_insn.py
b/src/openpower/decoder/power_insn.py
index 98fd44c923fabb602f80e80b38344158a5d20a7d..600d8fd4e38eb3f12d7a4285efc651637a61261c 100644
(file)
--- 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: