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:
e31ae9c
)
power_enums: allow SVPtype aliases
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 2 Aug 2022 12:50:07 +0000
(15:50 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 14 Aug 2022 19:07:43 +0000
(22:07 +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 e414178c379ded09c7b9b92984612d9682a0056e..3886bab00a47e359904ecb553252b7eb05189973 100644
(file)
--- a/
src/openpower/decoder/power_enums.py
+++ b/
src/openpower/decoder/power_enums.py
@@
-178,6
+178,10
@@
class SVPtype(Enum):
P1 = 1
P2 = 2
+ @classmethod
+ def _missing_(cls, value):
+ return {"1P": SVPtype.P1, "2P": SVPtype.P2}[value]
+
@unique
class SVEtype(Enum):