selectable_int: allow range in FieldSelectableInt
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 19 Apr 2022 12:43:41 +0000 (12:43 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 19 Apr 2022 12:43:41 +0000 (12:43 +0000)
src/openpower/decoder/selectable_int.py

index 34ea01550174df96a7cd13896d0775e33575c7b8..c5e48f9fde86cca66782e3240677cc049ad57b7d 100644 (file)
@@ -23,7 +23,7 @@ class FieldSelectableInt:
 
     def __init__(self, si, br):
         self.si = si  # target selectable int
-        if isinstance(br, list) or isinstance(br, tuple):
+        if isinstance(br, (list, tuple, range)):
             _br = BitRange()
             for i, v in enumerate(br):
                 _br[i] = v