From: Dmitry Selyutin Date: Fri, 16 Sep 2022 16:54:04 +0000 (+0300) Subject: selectable_int: replace bit_count with bit_length X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=884c0e7c5537e9668b71f6400f9da08958c9775e;p=openpower-isa.git selectable_int: replace bit_count with bit_length --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index 02c8839a..c4e45865 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -440,7 +440,7 @@ class SelectableInt: bits.append(bit) if isinstance(value, int): - if value.bit_count() > len(bits): + if value.bit_length() > len(bits): raise ValueError(value) value = SelectableInt(value=value, bits=len(bits)) if not isinstance(value, SelectableInt):