From: Dmitry Selyutin Date: Sun, 18 Dec 2022 19:13:20 +0000 (+0300) Subject: power_enums: fix RC1 predicates conversion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1d581b9e85a9ae27eaa61fe52214e055f9085d9;p=openpower-isa.git power_enums: fix RC1 predicates conversion --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 72532ec7..4651102e 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -407,14 +407,10 @@ class SVP64PredRC1(Enum): @classmethod def _missing_(cls, desc): - if isinstance(desc, str): - value = desc.upper() - if value.startswith("~"): - value = f"~{value[1:].strip()}" - - return cls.__members__.get(value) - - return super()._missing_(desc) + return { + "RC1": SVP64PredRC1.RC1, + "~RC1": SVP64PredRC1.RC1_N, + }.get(desc) def __int__(self): return 1