From: Dmitry Selyutin Date: Wed, 14 Sep 2022 22:49:15 +0000 (+0300) Subject: power_insn: allow accessing instruction bits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e97ad8c32cb4a352af55ae771f9ddc3f204ad47;p=openpower-isa.git power_insn: allow accessing instruction bits --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 5a85ecde..c57ec57a 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1058,6 +1058,12 @@ class Instruction(_Mapping): def __hash__(self): return hash(int(self)) + def __getitem__(self, key): + return self.storage.__getitem__(key) + + def __setitem__(self, key, value): + return self.storage.__setitem__(key, value) + def record(self, db): record = db[self] if record is None: