From: Dmitry Selyutin Date: Tue, 2 Aug 2022 12:50:07 +0000 (+0300) Subject: power_enums: allow SVPtype aliases X-Git-Tag: sv_maxu_works-initial~153 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e7cb1a65d3a1c22aa14a313b89b2210f2df4e31e;p=openpower-isa.git power_enums: allow SVPtype aliases --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index e414178c..3886bab0 100644 --- 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):