From 61b1dbc00856c490caa31c80020de85cbd9759c6 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 10 Sep 2022 22:38:30 +0300 Subject: [PATCH] power_insn: check exact matches directly in set --- src/openpower/decoder/power_insn.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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("."): -- 2.30.2