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:
428173c
)
power_enum: tune SVExtra representation
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Mon, 5 Sep 2022 17:58:13 +0000
(20:58 +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 29faffb15031eb1d88294f6dabed9c0bbc7c3696..cf08672a66cfcc354618ab053af65d4f98d9f958 100644
(file)
--- a/
src/openpower/decoder/power_enums.py
+++ b/
src/openpower/decoder/power_enums.py
@@
-209,6
+209,16
@@
class SVExtra(Enum):
Idx3 = 4
Idx_1_2 = 5 # due to weird BA/BB for crops
+ def __repr__(self):
+ return {
+ SVExtra.NONE: "NONE",
+ SVExtra.Idx0: "[0]",
+ SVExtra.Idx1: "[1]",
+ SVExtra.Idx2: "[2]",
+ SVExtra.Idx3: "[3]",
+ SVExtra.Idx_1_2: "[1:2]",
+ }[self]
+
# Backward compatibility
SVEXTRA = SVExtra