From: Dmitry Selyutin Date: Thu, 1 Sep 2022 14:50:54 +0000 (+0300) Subject: power_insn: support AA matching X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc3aad3d5173f9be3c147db69798a0ed2c749a11;p=openpower-isa.git power_insn: support AA matching --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index f0f476d7..1aee4737 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -864,11 +864,25 @@ class PPCDatabase: return exact_match(key[:-1], record) + def AA_match(key, record): + if not key.endswith("a"): + return False + + if record.intop not in {_MicrOp.OP_B, _MicrOp.OP_BC}: + return False + + if self.__mdwndb[key]["AA"] is None: + return False + + return (exact_match(key[:-1], record) or + LK_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) or - LK_match(key, record)): + LK_match(key, record) or + AA_match(key, record)): return (section, record) return (None, None)