From 4601d4d601504ec49d0c0d872eda37e3df78e13a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 1 Sep 2022 16:05:36 +0300 Subject: [PATCH] power_insn: support LK matching --- src/openpower/decoder/power_insn.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) -- 2.30.2