From: Dmitry Selyutin Date: Thu, 1 Sep 2022 13:05:36 +0000 (+0300) Subject: power_insn: support LK matching X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4601d4d601504ec49d0c0d872eda37e3df78e13a;p=openpower-isa.git power_insn: support LK matching --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 2ab2da11..f0f476d7 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -855,10 +855,20 @@ class PPCDatabase: return exact_match(key[:-1], record) + def LK_match(key, record): + if not key.endswith("l"): + return False + + if "lk" not in record.flags: + return False + + return exact_match(key[:-1], record) + for (section, records) in self.__db.items(): for record in records: if (exact_match(key, record) or - Rc_match(key, record)): + Rc_match(key, record) or + LK_match(key, record)): return (section, record) return (None, None)