aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-02-23 08:57:46 -0800
committerRichard Henderson <richard.henderson@linaro.org>2019-03-12 09:46:58 -0700
commiteb6b87fac70dd62e3f1286703db20c012e7a9611 (patch)
tree6be0abed75ef4c1b8dedab9522d60e05ae005d56 /scripts
parent9b3186e38f00ae0cba36c096e3654f916699f336 (diff)
downloadqemu-eb6b87fac70dd62e3f1286703db20c012e7a9611.zip
qemu-eb6b87fac70dd62e3f1286703db20c012e7a9611.tar.gz
qemu-eb6b87fac70dd62e3f1286703db20c012e7a9611.tar.bz2
decodetree: Do not unconditionaly return from Pattern.output_code
As a consequence, the 'return false' gets pushed up one level. This will allow us to perform some other action when the translator returns failure. Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decodetree.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index e26d825..cc5fa1a 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -348,8 +348,8 @@ class Pattern(General):
output(ind, self.base.extract_name(), '(&u.f_', arg, ', insn);\n')
for n, f in self.fields.items():
output(ind, 'u.f_', arg, '.', n, ' = ', f.str_extract(), ';\n')
- output(ind, 'return ', translate_prefix, '_', self.name,
- '(ctx, &u.f_', arg, ');\n')
+ output(ind, 'if (', translate_prefix, '_', self.name,
+ '(ctx, &u.f_', arg, ')) return true;\n')
# end Pattern
@@ -777,8 +777,8 @@ class Tree:
output(ind, ' /* ',
str_match_bits(innerbits, innermask), ' */\n')
s.output_code(i + 4, extracted, innerbits, innermask)
+ output(ind, ' return false;\n')
output(ind, '}\n')
- output(ind, 'return false;\n')
# end Tree
@@ -932,6 +932,7 @@ def main():
output(i4, '} u;\n\n')
t.output_code(4, False, 0, 0)
+ output(i4, 'return false;\n')
output('}\n')