From: Dmitry Selyutin Date: Fri, 9 Sep 2022 21:52:47 +0000 (+0300) Subject: power_insn: do not panic upon database query X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=99049a420a2385a846d45be4e63a04846b0ea274;p=openpower-isa.git power_insn: do not panic upon database query --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index a27e48eb..add1f85b 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1043,7 +1043,7 @@ class WordInstruction(Instruction): blob = " ".join(map(lambda byte: f"{byte:02x}", blob)) blob += " " - record = self.record(db=db) + record = db[self] if record is None: yield f"{blob}.long 0x{integer:08x}" return @@ -1498,7 +1498,7 @@ class SVP64Instruction(PrefixedInstruction): blob_prefix = blob(int(self.prefix)) blob_suffix = blob(int(self.suffix)) - record = self.record(db=db) + record = db[self] if record is None or record.svp64 is None: yield f"{blob_prefix}.long 0x{int(self.prefix):08x}" yield f"{blob_suffix}.long 0x{int(self.suffix):08x}"