From: Dmitry Selyutin Date: Tue, 16 Aug 2022 18:21:32 +0000 (+0300) Subject: selectable_int: allow fields-based instantiation X-Git-Tag: sv_maxu_works-initial~61 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef487d7ea1527f2ff9eec32de6f83e4eaefd44df;p=openpower-isa.git selectable_int: allow fields-based instantiation --- 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)