power_insn: try exact name matching first
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 4 Sep 2022 12:10:56 +0000 (15:10 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sun, 4 Sep 2022 12:12:12 +0000 (15:12 +0300)
src/openpower/decoder/power_insn.py

index 34ae88957279e3fc05bece07173c71fc8daaf9d2..3a3a662565a157cfb6a03b0ee5bda878e9f145ed 100644 (file)
@@ -1380,8 +1380,11 @@ class PPCDatabase:
 
         for (section, records) in self.__db.items():
             for record in records:
-                if (exact_match(key, record) or
-                        Rc_match(key, record) or
+                if exact_match(key, record):
+                    return (section, record)
+
+            for record in records:
+                if (Rc_match(key, record) or
                         LK_match(key, record) or
                         AA_match(key, record)):
                     return (section, record)