[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 9/8] decodetree: Produce clean output for an empty i
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 9/8] decodetree: Produce clean output for an empty input file |
Date: |
Wed, 27 Feb 2019 21:40:07 -0800 |
This is interesting for bisection, where an output file is plumbed,
but does not yet have patterns.
Signed-off-by: Richard Henderson <address@hidden>
---
One more small fix that should have gone with the v2 patchset.
---
scripts/decodetree.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 68979b73a0..1785769eec 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1050,15 +1050,16 @@ def main():
'(DisasContext *ctx, ', insntype, ' insn)\n{\n')
i4 = str_indent(4)
- output(i4, 'union {\n')
- for n in sorted(arguments.keys()):
- f = arguments[n]
- output(i4, i4, f.struct_name(), ' f_', f.name, ';\n')
- output(i4, '} u;\n\n')
- t.output_code(4, False, 0, 0)
+ if len(allpatterns) != 0:
+ output(i4, 'union {\n')
+ for n in sorted(arguments.keys()):
+ f = arguments[n]
+ output(i4, i4, f.struct_name(), ' f_', f.name, ';\n')
+ output(i4, '} u;\n\n')
+ t.output_code(4, False, 0, 0)
+
output(i4, 'return false;\n')
-
output('}\n')
if output_file:
--
2.17.2
- [Qemu-devel] [PATCH v2 1/8] MAINTAINERS: Add scripts/decodetree.py to the TCG section, (continued)
- [Qemu-devel] [PATCH v2 1/8] MAINTAINERS: Add scripts/decodetree.py to the TCG section, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 7/8] test/decode: Add tests for PatternGroups, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 3/8] decodetree: Document the usefulness of argument sets, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 6/8] decodetree: Allow grouping of overlapping patterns, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 5/8] decodetree: Do not unconditionaly return from Pattern.output_code, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 4/8] decodetree: Ensure build_tree does not include values outside insnmask, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 2/8] decodetree: Move documentation to docs/devel/decodetree.rst, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH v2 8/8] decodetree: Add --static-decode option, Richard Henderson, 2019/02/28
- [Qemu-devel] [PATCH 9/8] decodetree: Produce clean output for an empty input file,
Richard Henderson <=