From: Dmitry Selyutin Date: Wed, 17 Aug 2022 18:43:37 +0000 (+0300) Subject: power_enums: fix conversion from selector to reg X-Git-Tag: sv_maxu_works-initial~130 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9ce45fa32f9faea156f751191b60a608d1f3c0f;p=openpower-isa.git power_enums: fix conversion from selector to reg --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 45b30c11..7388a06b 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -252,7 +252,7 @@ class SVExtraReg(Enum): OutSel, CROutSel, ) if isinstance(value, selectors): - return cls.__members__.get(value, cls.NONE) + return cls.__members__.get(value.name, cls.NONE) return super()._missing_(value)