From e1d581b9e85a9ae27eaa61fe52214e055f9085d9 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 18 Dec 2022 22:13:20 +0300 Subject: [PATCH] power_enums: fix RC1 predicates conversion --- src/openpower/decoder/power_enums.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 -- 2.30.2