power_enums: fix conversion from selector to reg
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 17 Aug 2022 18:43:37 +0000 (21:43 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Wed, 17 Aug 2022 18:43:37 +0000 (21:43 +0300)
src/openpower/decoder/power_enums.py

index 45b30c11a9c9cb578f37d8c0b02619b3f22a6a59..7388a06b092dfad9529f107c634c33caccf426e6 100644 (file)
@@ -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)