From b41cad27ae0487b67143877660f7306d3df479a7 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 4 Aug 2022 23:06:45 +0300 Subject: [PATCH] power_enums: map in/out to extra --- src/openpower/decoder/power_enums.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 013d3d08..45b30c11 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -245,6 +245,16 @@ class SVExtraReg(Enum): WHOLE_REG = auto() SPR = auto() + @classmethod + def _missing_(cls, value): + selectors = ( + In1Sel, In2Sel, In3Sel, CRInSel, + OutSel, CROutSel, + ) + if isinstance(value, selectors): + return cls.__members__.get(value, cls.NONE) + return super()._missing_(value) + @unique class SVP64PredMode(Enum): -- 2.30.2