From 2fd4278144dff63b2a89aba03650d8db76cea1ac Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 16 Nov 2022 22:47:40 +0300 Subject: [PATCH] power_enums: support 8/16/32 in SVP64Width --- src/openpower/decoder/power_enums.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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): -- 2.30.2