From ef487d7ea1527f2ff9eec32de6f83e4eaefd44df Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Aug 2022 21:21:32 +0300 Subject: [PATCH] selectable_int: allow fields-based instantiation --- src/openpower/decoder/selectable_int.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index d1b8023c..cb12c83c 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -192,6 +192,11 @@ class SelectableInt: raise ValueError(value) bits = value.bits value = value.value + elif isinstance(value, FieldSelectableInt): + if bits is not None: + raise ValueError(value) + bits = len(value.br) + value = value.si.value else: if not isinstance(value, int): raise ValueError(value) -- 2.30.2