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:
1e0f8ba
)
power_enum: tune SVPtype representation
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Mon, 5 Sep 2022 18:36:24 +0000
(21:36 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 6 Sep 2022 11:44:56 +0000
(14:44 +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 4a8add835994bcafad9e864d81f87bfaa6c1c71b..daadc555e4a3e39b7f58fb66b88e55509aca909c 100644
(file)
--- a/
src/openpower/decoder/power_enums.py
+++ b/
src/openpower/decoder/power_enums.py
@@
-192,6
+192,13
@@
class SVPtype(Enum):
def _missing_(cls, value):
return {"1P": SVPtype.P1, "2P": SVPtype.P2}[value]
+ def __repr__(self):
+ return {
+ SVPtype.NONE: "NONE",
+ SVPtype.P1: "1P",
+ SVPtype.P2: "2P",
+ }[self]
+
@unique
class SVEtype(Enum):