[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 06/11] scripts/decodetree: Allow empty specifica
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [RFC PATCH 06/11] scripts/decodetree: Allow empty specifications |
Date: |
Mon, 12 Nov 2018 00:36:17 +0100 |
Starting with empty specifications allow to write stubs/templates,
useful when testing/rebasing.
This fixes:
decode.inc.c: In function ‘decode’:
decode.inc.c:9:7: error: unused variable ‘u’ [-Werror=unused-variable]
} u;
^
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
scripts/decodetree.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 08aa52d544..41ed67132d 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -1060,12 +1060,13 @@ def main():
output(decode_scope, 'bool ', decode_function,
'(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')
+ if arguments:
+ 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)
--
2.17.2
- [Qemu-devel] [RFC PATCH 11/11] target/mips: Port MIPS64 DCL[Z/O] to decodetree, (continued)
- [Qemu-devel] [RFC PATCH 11/11] target/mips: Port MIPS64 DCL[Z/O] to decodetree, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 07/11] scripts/decodetree: Add add_func_check(), Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 03/11] target/mips: Move the !ISA_MIPS32R6 check out of decode_opc_special2_legacy, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 01/11] MAINTAINERS: Add scripts/decodetree.py to the TCG section, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 04/11] target/mips: Avoid access to CPUMIPSState from decode* functions, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 06/11] scripts/decodetree: Allow empty specifications,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [RFC PATCH 09/11] target/mips: Port SYNCI to decodetree, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 10/11] scripts/decodetree: Add add_cond_check(), Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 08/11] target/mips: Add a decodetree stub, Philippe Mathieu-Daudé, 2018/11/11