whoops got mask/match test wrong in power_insn.py
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Sep 2022 13:22:09 +0000 (14:22 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Sep 2022 13:22:09 +0000 (14:22 +0100)
should be value & mask == search & mask

src/openpower/decoder/power_insn.py

index 3d70624adcb412c5d8edde7d5c077779cd447947..89ffeeca0210f3a1ee4b565f96a923c9ddbf8bad 100644 (file)
@@ -1947,7 +1947,7 @@ class RM(BaseRM):
         # look up in table
         if table is not None:
             for (value, mask, member) in table:
-                if ((value & search) == (mask & search)):
+                if ((value & mask) == (mask & search)):
                     rm = getattr(rm, member)
                     break