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:
b1bb737
)
power_enums: fix RC1 predicates conversion
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 18 Dec 2022 19:13:20 +0000
(22:13 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000
(22:47 +0300)
src/openpower/decoder/power_enums.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/power_enums.py
b/src/openpower/decoder/power_enums.py
index 72532ec7ce1b1b844813b7c0faf7c4376a4eb5b2..4651102e1915f26cc324b0f5bdf9cd7aea7f3e55 100644
(file)
--- a/
src/openpower/decoder/power_enums.py
+++ b/
src/openpower/decoder/power_enums.py
@@
-407,14
+407,10
@@
class SVP64PredRC1(Enum):
@classmethod
def _missing_(cls, desc):
- if isinstance(desc, str):
- value = desc.upper()
- if value.startswith("~"):
- value = f"~{value[1:].strip()}"
-
- return cls.__members__.get(value)
-
- return super()._missing_(desc)
+ return {
+ "RC1": SVP64PredRC1.RC1,
+ "~RC1": SVP64PredRC1.RC1_N,
+ }.get(desc)
def __int__(self):
return 1