[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v5 08/14] target/hexagon: prepare input for the idef-parser
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v5 08/14] target/hexagon: prepare input for the idef-parser |
Date: |
Wed, 23 Jun 2021 19:37:47 +0000 |
> -----Original Message-----
> From: Alessandro Di Federico <ale.qemu@rev.ng>
> Sent: Saturday, June 19, 2021 3:37 AM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>; Brian Cain
> <bcain@quicinc.com>; babush@rev.ng; nizzo@rev.ng; philmd@redhat.com;
> richard.henderson@linaro.org; Alessandro Di Federico <ale@rev.ng>
> Subject: [PATCH v5 08/14] target/hexagon: prepare input for the idef-parser
>
> From: Alessandro Di Federico <ale@rev.ng>
>
> Introduce infrastructure necessary to produce a file suitable for being parsed
> by the idef-parser.
>
> Signed-off-by: Alessandro Di Federico <ale@rev.ng>
> ---
> target/hexagon/gen_idef_parser_funcs.py | 114 ++++++++++++++++++
> target/hexagon/idef-parser/macros.inc | 153
> ++++++++++++++++++++++++
> target/hexagon/idef-parser/prepare | 24 ++++
> target/hexagon/meson.build | 17 +++
> 4 files changed, 308 insertions(+)
> create mode 100644 target/hexagon/gen_idef_parser_funcs.py
> create mode 100644 target/hexagon/idef-parser/macros.inc
> create mode 100755 target/hexagon/idef-parser/prepare
>
> diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
> index 6fd9360b74..bf4a0f76fa 100644
> --- a/target/hexagon/meson.build
> +++ b/target/hexagon/meson.build
> @@ -20,6 +20,7 @@ hexagon_ss = ss.source_set() hex_common_py =
> 'hex_common.py'
> attribs_def = meson.current_source_dir() / 'attribs_def.h.inc'
> gen_tcg_h = meson.current_source_dir() / 'gen_tcg.h'
> +idef_parser_dir = meson.current_source_dir() / 'idef-parser'
>
> #
> # Step 1
> @@ -175,4 +176,20 @@ hexagon_ss.add(files(
> 'fma_emu.c',
> ))
>
> +idef_parser_input_generated = custom_target(
> + 'idef_parser_input.h.inc',
> + output: 'idef_parser_input.h.inc',
Add depends: [semantics_generated],
> + depend_files: [hex_common_py],
Add gen_tcg_h
> + command: [python, files('gen_idef_parser_funcs.py'),
> +semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
> +)
> +
> +idef_parser_input_generated_prep = custom_target(
> + 'idef_parser_input.preprocessed.h.inc',
> + output: 'idef_parser_input.preprocessed.h.inc',
> + input: idef_parser_input_generated,
> + capture: true,
> + depend_files: [hex_common_py],
Don't think this is needed. If hex_common_py changes, the input will change.
But otherwise, this doesn't use hex_common.py.
> + command: [idef_parser_dir / 'prepare', '@INPUT@', '-I' +
> +idef_parser_dir],
It would be more clear to add '-o', '@OUTPUT@' to the command.
> +)
> +
> target_arch += {'hexagon': hexagon_ss}
> --
> 2.31.1
>
- Re: [PATCH v5 05/14] target/hexagon: make helper functions non-static, (continued)
- [PATCH v5 04/14] target/hexagon: make slot number an unsigned, Alessandro Di Federico, 2021/06/19
- [PATCH v5 06/14] target/hexagon: introduce new helper functions, Alessandro Di Federico, 2021/06/19
- [PATCH v5 02/14] target/hexagon: update MAINTAINERS for idef-parser, Alessandro Di Federico, 2021/06/19
- [PATCH v5 07/14] target/hexagon: expose next PC in DisasContext, Alessandro Di Federico, 2021/06/19
- [PATCH v5 08/14] target/hexagon: prepare input for the idef-parser, Alessandro Di Federico, 2021/06/19
- RE: [PATCH v5 08/14] target/hexagon: prepare input for the idef-parser,
Taylor Simpson <=
- [PATCH v5 09/14] target/hexagon: import lexer for idef-parser, Alessandro Di Federico, 2021/06/19
- [PATCH v5 03/14] target/hexagon: import README for idef-parser, Alessandro Di Federico, 2021/06/19
- [PATCH v5 11/14] target/hexagon: call idef-parser functions, Alessandro Di Federico, 2021/06/19
- [PATCH v5 14/14] gitlab-ci: do not use qemu-project Docker registry, Alessandro Di Federico, 2021/06/19