[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/12] decodetree: Produce clean output for an empty
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 09/12] decodetree: Produce clean output for an empty input file |
Date: |
Tue, 12 Mar 2019 10:03:31 -0700 |
This is interesting for bisection, where an output file is plumbed,
but does not yet have patterns.
Signed-off-by: Richard Henderson <address@hidden>
---
scripts/decodetree.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 6067e940ab..6e7ba278be 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1049,15 +1049,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] [PULL 00/12] decodetree patches, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 11/12] decodetree: Prefix extract function names with decode_function, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 10/12] decodetree: Allow +- to begin a number initializing a field, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 12/12] decodetree: Properly diagnose fields overflowing an insn, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 07/12] test/decode: Add tests for PatternGroups, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 09/12] decodetree: Produce clean output for an empty input file,
Richard Henderson <=
- [Qemu-devel] [PULL 08/12] decodetree: Add --static-decode option, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 04/12] decodetree: Ensure build_tree does not include values outside insnmask, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 05/12] decodetree: Do not unconditionaly return from Pattern.output_code, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 06/12] decodetree: Allow grouping of overlapping patterns, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 03/12] decodetree: Document the usefulness of argument sets, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 01/12] MAINTAINERS: Add scripts/decodetree.py to the TCG section, Richard Henderson, 2019/03/12
- [Qemu-devel] [PULL 02/12] decodetree: Move documentation to docs/devel/decodetree.rst, Richard Henderson, 2019/03/12
- Re: [Qemu-devel] [PULL 00/12] decodetree patches, Peter Maydell, 2019/03/13