From: Dmitry Selyutin Date: Fri, 19 Aug 2022 04:53:35 +0000 (+0300) Subject: selectable_int: support FSI.__len__ method X-Git-Tag: sv_maxu_works-initial~34 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=788658bff909d5265fcc79d4d51da2ca8c6852db;p=openpower-isa.git selectable_int: support FSI.__len__ method --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index 22985014..22fb8311 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -70,6 +70,9 @@ class FieldSelectableInt: vi = op(vi) return self.merge(vi) + def __len__(self): + return len(self.br) + def __getitem__(self, key): log("getitem", key, self.br) if isinstance(key, SelectableInt):