[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guar
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard |
Date: |
Mon, 12 Nov 2018 20:30:27 -0200 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Mon, Nov 12, 2018 at 12:36:13AM +0100, Philippe Mathieu-Daudé wrote:
> It is necessary when splitting an ISA, or when using multiple ISAs.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> TODO: explain why, use case
> TODO: escape full path?
> ---
> scripts/decodetree.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/decodetree.py b/scripts/decodetree.py
> index 0bc73b5990..5dea15e7a5 100755
> --- a/scripts/decodetree.py
> +++ b/scripts/decodetree.py
> @@ -1030,7 +1030,11 @@ def main():
> else:
> output_fd = sys.stdout
>
> + hdr_guard = filename.split(os.path.sep)[-1].upper().replace('.', '_') +
> "_H"
Isn't
filename.split(os.path.sep)[-1]
equivalent to
os.path.basename(filename)
?
> + 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()
> --
> 2.17.2
>
--
Eduardo
- [Qemu-devel] [RFC PATCH 03/11] target/mips: Move the !ISA_MIPS32R6 check out of decode_opc_special2_legacy, (continued)
- [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é, 2018/11/11
- [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
- Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard,
Eduardo Habkost <=
- [Qemu-devel] [RFC PATCH 08/11] target/mips: Add a decodetree stub, Philippe Mathieu-Daudé, 2018/11/11