decodetree: Support multiple inclusion
cover decodetree: Support multiple inclusion
Hi Richard, I noticed this issue when using decodetree with multiple ISAs.
Regards,
Phil.
Philippe Mathieu-Daudé (2):
MAINTAINERS: Add scripts/decodetree.py to the TCG section
decodetree: Add multiple include guard
MAINTAINERS | 1 + scripts/decodetree.py | 5 +++++ 2 files changed, 6 insertions(+)
Signature · 1 line
2.19.1
PATCH 1/2 MAINTAINERS: Add scripts/decodetree.py to the TCG section
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -112,6 +112,7 @@ S: Maintained F: cpus.c F: exec.c F: accel/tcg/ +F: scripts/decodetree.py F: include/exec/cpu*.h F: include/exec/exec-all.h F: include/exec/helper*.h
Signature · 1 line
2.19.1
PATCH 2/2 decodetree: Add multiple include guard
In reply to Philippe Mathieu-DaudéIt is necessary when splitting an ISA, or when using multiple ISAs.
--- scripts/decodetree.py | 5 +++++ 1 file changed, 5 insertions(+)
scripts/decodetree.py +5 -0
@@ -1030,7 +1030,11 @@ def main(): else: output_fd = sys.stdout + hdr_guard = filename.split(os.path.sep)[-1].upper().replace('.', '_') + "_H" + output_autogen() + output('#ifndef ' + hdr_guard + '\n') + output('#define ' + hdr_guard + '\n') for n in sorted(arguments.keys()): f = arguments[n] f.output_def()
@@ -1066,6 +1070,7 @@ def main(): t.output_code(4, False, 0, 0) output('}\n') + output('#endif /* ' + hdr_guard + ' */\n') if output_file: output_fd.close()
Signature · 1 line
2.19.1
Re: [Qemu-devel] [PATCH 2/2] decodetree: Add multiple include guard
Quoted 6 lines · Philippe Mathieu-Daudé
It is necessary when splitting an ISA, or when using multiple ISAs.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- scripts/decodetree.py | 5 +++++ 1 file changed, 5 insertions(+)
I guess I have no problems with this, but can you explain when these headers get included more than once?
r~
Richard Henderson
AppliedRe: [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add scripts/decodetree.py to the TCG section
In reply to Philippe Mathieu-DaudéQuoted 4 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
Queued, thanks.
r~