From: Dmitry Selyutin Date: Sat, 10 Sep 2022 19:38:30 +0000 (+0300) Subject: power_insn: check exact matches directly in set X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61b1dbc00856c490caa31c80020de85cbd9759c6;p=openpower-isa.git power_insn: check exact matches directly in set --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index e02024f5..90aac4d0 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -1783,11 +1783,7 @@ class PPCDatabase: def __getitem__(self, key): def exact_match(key, record): - for name in record.names: - if name == key: - return True - - return False + return (key in record.names) def Rc_match(key, record): if not key.endswith("."):