diff mbox series

[PULL,04/12] decodetree: Ensure build_tree does not include values outside insnmask

Message ID 20190312170334.14005-5-richard.henderson@linaro.org
State Accepted
Commit 9b3186e38f00ae0cba36c096e3654f916699f336
Headers show
Series decodetree patches | expand

Commit Message

Richard Henderson March 12, 2019, 5:03 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>


Reproduced with "scripts/decodetree.py /dev/null".

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 scripts/decodetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.2
diff mbox series

Patch

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 33e32ee87f..e26d8253f2 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -784,7 +784,7 @@  class Tree:
 
 def build_tree(pats, outerbits, outermask):
     # Find the intersection of all remaining fixedmask.
-    innermask = ~outermask
+    innermask = ~outermask & insnmask
     for i in pats:
         innermask &= i.fixedmask