From: Dmitry Selyutin Date: Wed, 16 Nov 2022 19:47:40 +0000 (+0300) Subject: power_enums: support 8/16/32 in SVP64Width X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fd4278144dff63b2a89aba03650d8db76cea1ac;p=openpower-isa.git power_enums: support 8/16/32 in SVP64Width --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 3025c255..a12a5dec 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -472,6 +472,19 @@ class SVP64width(Enum): EW_16 = 2 EW_8 = 3 + @classmethod + def _missing_(cls, desc): + if isinstance(desc, str): + return { + "32": SVP64width.EW_32, + "16": SVP64width.EW_16, + "8": SVP64width.EW_8, + }.get(desc) + + return super()._missing_(desc) + +SVP64Width = SVP64width + @unique class SVP64subvl(Enum):