power_insn: allow accessing instruction bits
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 14 Sep 2022 22:49:15 +0000 (01:49 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 15 Sep 2022 20:54:31 +0000 (21:54 +0100)
src/openpower/decoder/power_insn.py

index 5a85ecdee1e5b9c1cee11a8d9eadf5a895fec443..c57ec57ac3ee53bea3b09deb4ce9179a7e350d51 100644 (file)
@@ -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: