]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
decodetree: Ensure build_tree does not include values outside insnmask
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 17 Dec 2018 04:07:38 +0000 (20:07 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 12 Mar 2019 16:46:58 +0000 (09:46 -0700)
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

index 33e32ee87ff29fa24439dfd60853fd32bc68a447..e26d8253f23f3b9726d1edb0151d3125162f2272 100755 (executable)
@@ -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