From 884c0e7c5537e9668b71f6400f9da08958c9775e Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 16 Sep 2022 19:54:04 +0300 Subject: [PATCH] selectable_int: replace bit_count with bit_length --- src/openpower/decoder/selectable_int.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.30.2